Added commented-out Java 6 improvements.

This commit is contained in:
Ray J. Greenwell
2015-01-21 10:26:52 -08:00
parent 39d1356e56
commit e275c2ceda
2 changed files with 2 additions and 0 deletions
@@ -318,6 +318,7 @@ public class ObjectInputStream extends DataInputStream
byte[] bbuf = new byte[utflen];
in.read(bbuf);
return new String(bbuf, "UTF-8");
//return new String(bbuf, Charsets.UTF_8); // TODO Java 6 (Charsets is from guava)
}
@Override
@@ -304,6 +304,7 @@ public class ObjectOutputStream extends DataOutputStream
public void writeUnmodifiedUTF (String str)
throws IOException
{
// byte[] bytes = str.getBytes(Charsets.UTF_8); // TODO Java 6 (Charsets is from guava)
byte[] bytes = str.getBytes("UTF-8");
writeShort(bytes.length);
write(bytes);