ByteSequence content = getContent(); InputStream is = new ByteArrayInputStream(content); if (isCompressed()) { is = new InflaterInputStream(is);
/** * Gets the serializable object containing this message's data. The default * value is null. * * @return the serializable object containing this message's data * @throws JMSException */ public Serializable getObject() throws JMSException { if (object == null && getContent() != null) { try { ByteSequence content = getContent(); InputStream is = new ByteArrayInputStream(content); if (isCompressed()) { is = new InflaterInputStream(is); } DataInputStream dataIn = new DataInputStream(is); ClassLoadingAwareObjectInputStream objIn = new ClassLoadingAwareObjectInputStream(dataIn); try { object = (Serializable)objIn.readObject(); } catch (ClassNotFoundException ce) { throw JMSExceptionSupport.create("Failed to build body from content. Serializable class not available to broker. Reason: " + ce, ce); } finally { dataIn.close(); } } catch (IOException e) { throw JMSExceptionSupport.create("Failed to build body from bytes. Reason: " + e, e); } } return this.object; }
ByteSequence content = getContent(); InputStream is = new ByteArrayInputStream(content); if (isCompressed()) { is = new InflaterInputStream(is);
ByteSequence content = getContent(); InputStream is = new ByteArrayInputStream(content); if (isCompressed()) { is = new InflaterInputStream(is);
ByteSequence content = getContent(); InputStream is = new ByteArrayInputStream(content); if (isCompressed()) { is = new InflaterInputStream(is);
ByteSequence contents = message.getContent(); if (message.isCompressed()) { try (ByteArrayOutputStream os = new ByteArrayOutputStream(); ByteArrayInputStream is = new ByteArrayInputStream(contents);
ByteSequence contents = message.getContent(); if (message.isCompressed()) { try (ByteArrayOutputStream os = new ByteArrayOutputStream(); ByteArrayInputStream is = new ByteArrayInputStream(contents);