130131132133134135136137138139140
StreamMessage testMessage = _session.createStreamMessage(); byte[] testBytes = convertToBytes(test); testMessage.writeBytes(testBytes); sendAndTest(testMessage, testBytes); } public void testTextMessage() throws JMSException, IOException
173174175176177178179180181182183
try { while ((len = value.read(buffer)) != -1) { streamMessage.writeBytes(buffer, 0, len); } } catch (IOException e) { throw new JMSException("Failed to read input stream to create a stream message: " + e);
12461247124812491250125112521253125412551256
m.writeInt(myInt); m.writeLong(myLong); m.writeFloat(myFloat); m.writeDouble(myDouble); m.writeString(myString); m.writeBytes(myBytes); m.writeBytes(myBytes, 2, 3); m.writeObject(new Boolean(myBool)); m.writeObject(new Byte(myByte)); m.writeObject(new Short(myShort));
12471248124912501251125212531254125512561257
m.writeLong(myLong); m.writeFloat(myFloat); m.writeDouble(myDouble); m.writeString(myString); m.writeBytes(myBytes); m.writeBytes(myBytes, 2, 3); m.writeObject(new Boolean(myBool)); m.writeObject(new Byte(myByte)); m.writeObject(new Short(myShort)); m.writeObject(new Integer(myInt));
15291530153115321533153415351536153715381539
{ } try { m2.writeBytes(myBytes); ProxyAssertSupport.fail(); } catch (javax.jms.MessageNotWriteableException e) { }
11761177117811791180118111821183118411851186
11771178117911801181118211831184118511861187
14341435143614371438143914401441144214431444
{ } try { m2.writeBytes(myBytes); fail(); } catch (javax.jms.MessageNotWriteableException e) { }
8687888990919293949596
StreamMessage sm = (StreamMessage)m; sm.writeBoolean(true); sm.writeByte((byte)3); sm.writeBytes(new byte[] {(byte)4, (byte)5, (byte)6}); sm.writeChar((char)7); sm.writeDouble(8.0); sm.writeFloat(9.0f); sm.writeInt(10); sm.writeLong(11l);