// String
msg = new StreamMessageImpl();
msg.writeBytes(dummy);
msg.markAsReadOnly();
try { msg.readString(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(3,msg.readBytes(new byte[3]));
// Bytes
msg = new StreamMessageImpl();
msg.writeBytes(dummy);