private String decodeContent(ByteSequence bodyAsBytes) throws JMSException { String text = null; if (bodyAsBytes != null) { InputStream is = null; try { is = new ByteArrayInputStream(bodyAsBytes); if (isCompressed()) { is = new InflaterInputStream(is); } DataInputStream dataIn = new DataInputStream(is); text = MarshallingSupport.readUTF8(dataIn); dataIn.close(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); } finally { if (is != null) { try { is.close(); } catch (IOException e) { // ignore } } } } return text; }
private String decodeContent(ByteSequence bodyAsBytes) throws JMSException { String text = null; if (bodyAsBytes != null) { InputStream is = null; try { is = new ByteArrayInputStream(bodyAsBytes); if (isCompressed()) { is = new InflaterInputStream(is); } DataInputStream dataIn = new DataInputStream(is); text = MarshallingSupport.readUTF8(dataIn); dataIn.close(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); } finally { if (is != null) { try { is.close(); } catch (IOException e) { // ignore } } } } return text; }
private String decodeContent(ByteSequence bodyAsBytes) throws JMSException { String text = null; if (bodyAsBytes != null) { InputStream is = null; try { is = new ByteArrayInputStream(bodyAsBytes); if (isCompressed()) { is = new InflaterInputStream(is); } DataInputStream dataIn = new DataInputStream(is); text = MarshallingSupport.readUTF8(dataIn); dataIn.close(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); } finally { if (is != null) { try { is.close(); } catch (IOException e) { // ignore } } } } return text; }
private String decodeContent(ByteSequence bodyAsBytes) throws JMSException { String text = null; if (bodyAsBytes != null) { InputStream is = null; try { is = new ByteArrayInputStream(bodyAsBytes); if (isCompressed()) { is = new InflaterInputStream(is); } DataInputStream dataIn = new DataInputStream(is); text = MarshallingSupport.readUTF8(dataIn); dataIn.close(); } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); } finally { if (is != null) { try { is.close(); } catch (IOException e) { // ignore } } } } return text; }
public String getText() throws JMSException { if (text == null && getContent() != null) { InputStream is = null; try { ByteSequence bodyAsBytes = getContent(); if (bodyAsBytes != null) { is = new ByteArrayInputStream(bodyAsBytes); if (isCompressed()) { is = new InflaterInputStream(is); } DataInputStream dataIn = new DataInputStream(is); text = MarshallingSupport.readUTF8(dataIn); dataIn.close(); setContent(null); setCompressed(false); } } catch (IOException ioe) { throw JMSExceptionSupport.create(ioe); } finally { if (is != null) { try { is.close(); } catch (IOException e) { // ignore } } } } return text; }
ByteSequence contents = message.getContent(); if (message.isCompressed()) { try (ByteArrayInputStream is = new ByteArrayInputStream(contents); InflaterInputStream iis = new InflaterInputStream(is);
ByteSequence contents = message.getContent(); if (message.isCompressed()) { try (ByteArrayInputStream is = new ByteArrayInputStream(contents); InflaterInputStream iis = new InflaterInputStream(is);