6162636465666768697071
try { JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage(); bm.writeInt(10); bm.reset(); bm.writeInt(12); fail("expected exception did not occur"); } catch (MessageNotWriteableException m) { // ok
7778798081828384858687
} public void testClearBodyMakesWritable() throws Exception { JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage(); bm.writeInt(10); bm.reset(); bm.clearBody(); bm.writeInt(10); }
8081828384858687888990
{ JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage(); bm.writeInt(10); bm.reset(); bm.clearBody(); bm.writeInt(10); } public void testWriteBoolean() throws Exception { JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage();
9899100101102103104105106107108
} public void testWriteInt() throws Exception { JMSBytesMessage bm = TestMessageHelper.newJMSBytesMessage(); bm.writeInt(10); bm.reset(); long len = bm.getBodyLength(); assertTrue(len == 4); int val = bm.readInt(); assertTrue(val == 10);