Package org.codehaus.activemq.message.util

Examples of org.codehaus.activemq.message.util.ByteArray


    public ActiveMQMessage deepCopy() throws JMSException {
        ActiveMQStreamMessage other = new ActiveMQStreamMessage();
        this.initializeOther(other);
        try {
            if (this.getBodyAsBytes() != null) {
                ByteArray data = this.getBodyAsBytes().copy();
                other.setBodyAsBytes(data);
            }
        }
        catch (IOException e) {
            JMSException jmsEx = new JMSException("setBodyAsBytes() failed");
View Full Code Here


    private void initializeReading() throws MessageNotReadableException {
        if (!super.readOnlyMessage) {
            throw new MessageNotReadableException("This message is in write-only mode");
        }
        try {
            ByteArray data = super.getBodyAsBytes();
            if (this.dataIn == null && data != null) {
                if (ByteArrayCompression.isCompressed(data)){
                    ByteArrayCompression compression = new ByteArrayCompression();
                    data = compression.inflate(data);
                }
                ByteArrayInputStream bytesIn = new ByteArrayInputStream(data.getBuf(),data.getOffset(),data.getLength());
                this.dataIn = new DataInputStream(bytesIn);
            }
        }
        catch (IOException e) {
            MessageNotReadableException mnr = new MessageNotReadableException("getBodyAsBytes failed");
View Full Code Here

TOP

Related Classes of org.codehaus.activemq.message.util.ByteArray

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.