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];
|
byte[] bbuf = new byte[utflen];
|
||||||
in.read(bbuf);
|
in.read(bbuf);
|
||||||
return new String(bbuf, "UTF-8");
|
return new String(bbuf, "UTF-8");
|
||||||
|
//return new String(bbuf, Charsets.UTF_8); // TODO Java 6 (Charsets is from guava)
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -304,6 +304,7 @@ public class ObjectOutputStream extends DataOutputStream
|
|||||||
public void writeUnmodifiedUTF (String str)
|
public void writeUnmodifiedUTF (String str)
|
||||||
throws IOException
|
throws IOException
|
||||||
{
|
{
|
||||||
|
// byte[] bytes = str.getBytes(Charsets.UTF_8); // TODO Java 6 (Charsets is from guava)
|
||||||
byte[] bytes = str.getBytes("UTF-8");
|
byte[] bytes = str.getBytes("UTF-8");
|
||||||
writeShort(bytes.length);
|
writeShort(bytes.length);
|
||||||
write(bytes);
|
write(bytes);
|
||||||
|
|||||||
Reference in New Issue
Block a user