for(int i=Short.MIN_VALUE; i <= Short.MAX_VALUE; i++)
out.writeShort(i);
ByteArrayDataInputStream in=new ByteArrayDataInputStream(out.buffer());
for(int i=Short.MIN_VALUE; i <= Short.MAX_VALUE; i++) {
short read=in.readShort();
assert i == read;
}
}
public void testUnsignedShort() throws IOException {