// Byte
msg = new StreamMessageImpl();
msg.writeString("foobar");
msg.markAsReadOnly();
try { msg.readByte(); fail("Should have failed"); } catch (NumberFormatException e) { /* OK */ }
assertEquals("foobar",msg.readString());
// Short
msg = new StreamMessageImpl();
msg.writeString("foobar");