public String getText() throws JMSException {
if (text == null && getContent() != null) {
try {
ByteSequence bodyAsBytes = getContent();
if (bodyAsBytes != null) {
InputStream is = new ByteArrayInputStream(bodyAsBytes);
if( isCompressed() ) {
is = new InflaterInputStream(is);
}
DataInputStream dataIn = new DataInputStream(is);
text = MarshallingSupport.readUTF8(dataIn);