Use the JMS methods to get the bytes in a BytesMessage since those decompress the payload if the content was compressed.

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@389841 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2006-03-29 17:26:58 +00:00
parent 4060ad9231
commit c80b084cdc
1 changed files with 2 additions and 1 deletions

View File

@ -79,7 +79,8 @@ public class Subscription {
builder.setBody(((ActiveMQTextMessage)m).getText().getBytes("UTF-8"));
} else if( m.getDataStructureType() == ActiveMQBytesMessage.DATA_STRUCTURE_TYPE ) {
ActiveMQBytesMessage msg = (ActiveMQBytesMessage)m;
byte[] data = msg.getContent().getData();
byte[] data = new byte[(int)msg.getBodyLength()];
msg.readBytes(data);
builder.setBody(data);
}