}
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++)
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;