ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(2);
out.writeBoolean(true);
out.writeBoolean(false);
ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
assert in.readBoolean();
assert !in.readBoolean();
}
public void testShort() throws IOException {
ByteArrayDataOutputStream out=new ByteArrayDataOutputStream(Short.MAX_VALUE * 4 + 10);
for(int i=Short.MIN_VALUE; i <= Short.MAX_VALUE; i++)