@Test(expected = MessageNotWriteableException.class) public void testReceivedBytesMessageThrowsMessageNotWriteableExceptionOnWriteBytes() throws Exception { byte[] content = "myBytesData".getBytes(); JmsTestBytesMessageFacade facade = new JmsTestBytesMessageFacade(content); JmsBytesMessage bytesMessage = new JmsBytesMessage(facade); bytesMessage.onDispatch(); bytesMessage.writeBytes(content); }
@Override public void writeBytes(byte[] value) throws JMSException { initializeWriting(); try { this.dataOut.write(value); } catch (IOException e) { throw JmsExceptionSupport.createMessageFormatException(e); } }
JmsBytesMessage extends JmsMessage implements BytesMessage { @Override public void writeBytes(byte[] value) throws JMSException { initializeWriting(); try { this.dataOut.write(value); } catch (IOException e) { throw JmsExceptionSupport.createMessageFormatException(e); } } }
JmsBytesMessage extends JmsMessage implements BytesMessage { @Override public void writeBytes(byte[] value) throws JMSException { initializeWriting(); try { this.dataOut.write(value); } catch (IOException e) { throw JmsExceptionSupport.createMessageFormatException(e); } } JmsBytesMessage(JmsBytesMessageFacade facade); }
JmsBytesMessage extends JmsMessage implements BytesMessage { @Override public void writeBytes(byte[] value) throws JMSException { initializeWriting(); try { this.dataOut.write(value); } catch (IOException e) { throw JmsExceptionSupport.createMessageFormatException(e); } } JmsBytesMessage(JmsBytesMessageFacade facade); @Override JmsBytesMessage copy(); @Override boolean equals(Object other); @Override int hashCode(); @Override void clearBody(); @Override long getBodyLength(); @Override boolean readBoolean(); @Override byte readByte(); @Override int readUnsignedByte(); @Override short readShort(); @Override int readUnsignedShort(); @Override char readChar(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override String readUTF(); @Override int readBytes(byte[] value); @Override int readBytes(byte[] value, int length); @Override void writeBoolean(boolean value); @Override void writeByte(byte value); @Override void writeShort(short value); @Override void writeChar(char value); @Override void writeInt(int value); @Override void writeLong(long value); @Override void writeFloat(float value); @Override void writeDouble(double value); @Override void writeUTF(String value); @Override void writeBytes(byte[] value); @Override void writeBytes(byte[] value, int offset, int length); @Override void writeObject(Object value); @Override void reset(); @Override void onSend(long producerTtl); @Override String toString(); @Override boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class target); }
JmsBytesMessage extends JmsMessage implements BytesMessage { @Override public void writeBytes(byte[] value) throws JMSException { initializeWriting(); try { this.dataOut.write(value); } catch (IOException e) { throw JmsExceptionSupport.createMessageFormatException(e); } } JmsBytesMessage(JmsBytesMessageFacade facade); @Override JmsBytesMessage copy(); @Override boolean equals(Object other); @Override int hashCode(); @Override void clearBody(); @Override long getBodyLength(); @Override boolean readBoolean(); @Override byte readByte(); @Override int readUnsignedByte(); @Override short readShort(); @Override int readUnsignedShort(); @Override char readChar(); @Override int readInt(); @Override long readLong(); @Override float readFloat(); @Override double readDouble(); @Override String readUTF(); @Override int readBytes(byte[] value); @Override int readBytes(byte[] value, int length); @Override void writeBoolean(boolean value); @Override void writeByte(byte value); @Override void writeShort(short value); @Override void writeChar(char value); @Override void writeInt(int value); @Override void writeLong(long value); @Override void writeFloat(float value); @Override void writeDouble(double value); @Override void writeUTF(String value); @Override void writeBytes(byte[] value); @Override void writeBytes(byte[] value, int offset, int length); @Override void writeObject(Object value); @Override void reset(); @Override void onSend(long producerTtl); @Override String toString(); @Override boolean isBodyAssignableTo(@SuppressWarnings("rawtypes") Class target);  }