// Char
msg = new StreamMessageImpl();
msg.writeString("foobar");
msg.markAsReadOnly();
try { msg.readChar(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals("foobar",msg.readString());
// Int
msg = new StreamMessageImpl();
msg.writeString("foobar");