Package org.activemq.message.util

Examples of org.activemq.message.util.WireByteArrayInputStream


       
        if (ba.get(ActiveMQMessage.PAYLOAD_INDEX)) {
            int payloadLength = dataIn.readInt();
            if (payloadLength >= 0) {
                if (dataIn instanceof WireByteArrayInputStream){
                    WireByteArrayInputStream wireIn = (WireByteArrayInputStream)dataIn;
                    msg.setBodyAsBytes(wireIn.getRawData(), wireIn.position(), payloadLength);
                }else {
                byte[] payload = new byte[payloadLength];
                dataIn.readFully(payload);
                msg.setBodyAsBytes(payload,0,payload.length);
                }
View Full Code Here


     * Default Constructor
     */
    public DefaultWireFormat() {
        internalBytesOut = new WireByteArrayOutputStream();
        internalDataOut = new DataOutputStream(internalBytesOut);
        internalBytesIn = new WireByteArrayInputStream();
        internalDataIn = new DataInputStream(internalBytesIn);
        this.currentWireFormatVersion = WIRE_FORMAT_VERSION;
        this.cachedKeyGenerator = new SynchronizedShort((short) 0);
        this.cachedBytesOut = new WireByteArrayOutputStream();
        this.cachedDataOut = new DataOutputStream(cachedBytesOut);
View Full Code Here

TOP

Related Classes of org.activemq.message.util.WireByteArrayInputStream

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.