Added commented-out Java 6 improvements.
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user