try { msg.readFloat(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals('c',msg.readChar());
// Double
msg = new StreamMessageImpl();
msg.writeChar('c');
msg.markAsReadOnly();
try { msg.readDouble(); fail("Should have failed"); } catch (MessageFormatException e) { /* OK */ }
assertEquals('c',msg.readChar());
// String