Example #1
0
 /**
  * Get the exact representation of the message
  *
  * @return the internal byte[] representing the contents of this message.
  */
 public static byte[] getMessage(MutableBufferedMessage message) {
   byte[] header = message.getHeader();
   byte[] content = message.getContent();
   if (content != null && content.length > 0) {
     byte[] bytes = new byte[header.length + content.length];
     System.arraycopy(header, 0, bytes, 0, header.length);
     System.arraycopy(content, 0, bytes, header.length, content.length);
     return bytes;
   }
   return header;
 }