assert name.equals(tmp);
}
public void testUTFWithDoubleByteChar2() throws IOException {
String name="Bela\420";
ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(2);
out.writeUTF(name);
assert out.position() == Bits.sizeUTF(name);
ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
String tmp=in.readUTF();
assert name.equals(tmp);
name="";
out=new ByteArrayDataOutputStream(2);
out.writeUTF(name);
assert out.position() == Bits.sizeUTF(name);
in=new ByteArrayDataInputStream(out.buffer());
tmp=in.readUTF();
assert name.equals(tmp);
name=null;
out=new ByteArrayDataOutputStream(2);
out.writeUTF(name);
assert out.position() == Bits.sizeUTF(name);
in=new ByteArrayDataInputStream(out.buffer());
tmp=in.readUTF();
assert tmp == null;
}