try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(123,msg.readByte());
// Double
msg = new StreamMessageImpl();
msg.writeByte((byte)123);
msg.markAsReadOnly();
try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals(123,msg.readByte());
// String