bm.readBytes(bytes);
assertEquals('g', bm.readChar());
assertEquals((short) 29, bm.readShort());
assertEquals(101, bm.readInt());
assertEquals(50003222L, bm.readLong());
assertEquals("Foobar", bm.readUTF());
assertEquals(1.7f, bm.readFloat());
assertEquals(8.7d, bm.readDouble());
}
public void testWriteObjectRejectsNonPrimitives() throws Exception