Package com.sun.messaging.jmq.io

Examples of com.sun.messaging.jmq.io.JMQByteBufferInputStream


        }

        // If there is a message body, then it should contain an Xid.
        ByteBuffer body = msg.getMessageBodyByteBuffer();
        if (body != null) {
            JMQByteBufferInputStream  bbis = new JMQByteBufferInputStream(body);
            try {
                xid = JMQXid.read(new DataInputStream(bbis));
                startNextTransaction=false;
            } catch (IOException e) {
                logger.log(Logger.ERROR,
View Full Code Here


    private Packet parseMessage(byte[] data) throws IOException {

  packetSize = data.length;

  ByteBuffer databuf = ByteBuffer.wrap(data);
  JMQByteBufferInputStream bis = new JMQByteBufferInputStream(databuf);
  Packet msg = new Packet(false);
        msg.generateTimestamp(false);
        msg.generateSequenceNumber(false);
  msg.readPacket(bis);
  bis.close();
  return msg;
    }
View Full Code Here

      if (parent.useFileChannel) {
    pkt.readPacket(r.getChannel(), false);
      } else {
    ByteBuffer buf = ByteBuffer.wrap(new byte[packetSize]);
    r.read(buf.array());
    JMQByteBufferInputStream bis =
        new JMQByteBufferInputStream(buf);
    pkt.readPacket(bis);
    bis.close();
      }

      return pkt;
  } catch (Throwable t) {
      logger.log(logger.ERROR, parent.myDestination +
View Full Code Here

TOP

Related Classes of com.sun.messaging.jmq.io.JMQByteBufferInputStream

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.