Examples of readBytes()


Examples of fiftyone.mobile.detection.readers.TrieReader.readBytes()

             BinaryConstants.FormatVersion.Major));
             }*/

            // Create the new provider.
            return new TrieProvider(
                    new String(reader.readBytes((int) reader.readUInt())),
                    ReadStrings(reader),
                    ReadProperties(reader),
                    ReadDevices(reader),
                    ReadLookupList(reader),
                    reader.readLong(),
View Full Code Here

Examples of io.airlift.slice.BasicSliceInput.readBytes()

        indexBitLength = input.readByte();
        checkArgument(indexBitLength >= 1 && indexBitLength <= Short.SIZE, "indexBitLength is out of range");

        baseline = input.readByte();
        deltas = new byte[numberOfBuckets(indexBitLength) / 2];
        input.readBytes(deltas);
        overflowBucket = input.readShort();
        overflowValue = input.readByte();

        baselineCount = 0;
        for (int i = 0; i < numberOfBuckets(indexBitLength); i++) {
View Full Code Here

Examples of io.netty.buffer.ByteBuf.readBytes()

    public DelegationTransfer transfer(TransferBuffer buffer) {
      ByteBuf buf = ByteBuf.class.cast(buffer.getBuffer());
      try {
        this.lock.lock();
        int readable = buf.readableBytes();
        buf.readBytes(this.output, readable);
        this.readable.addAndGet(readable);
        return this;
      } catch (Exception e) {
        DegelationTransferBuilder.this.log.error(e);
        Trace.trace(DegelationTransferBuilder.this.log, e);
View Full Code Here

Examples of io.netty.buffer.ChannelBuffer.readBytes()

        synchronized (z) {
            try {
                // Configure input.
                ChannelBuffer compressed = (ChannelBuffer) msg;
                byte[] in = new byte[compressed.readableBytes()];
                compressed.readBytes(in);
                z.next_in = in;
                z.next_in_index = 0;
                z.avail_in = in.length;

                // Configure output.
View Full Code Here

Examples of io.netty.buffer.CompositeByteBuf.readBytes()

            out.addComponent(msg);
            out.writerIndex(out.writerIndex() + msg.readableBytes());
        }

        byte[] compressed = new byte[out.readableBytes()];
        out.readBytes(compressed);
        out.release();

        ByteArrayInputStream is = new ByteArrayInputStream(compressed);
        LZ4BlockInputStream lz4Is = new LZ4BlockInputStream(is);
        byte[] uncompressed = new byte[originalLength];
View Full Code Here

Examples of javax.jms.BytesMessage.readBytes()

         BytesMessage bytesMsg = (BytesMessage)msg;
         long length = bytesMsg.getBodyLength();
         if (length >= Integer.MAX_VALUE)
            throw new XBException("feature.missing", "Handling of big message not implemented");
         content = new byte[(int)length];
         bytesMsg.readBytes(content);
      }
      else if (msg instanceof ObjectMessage) {
         qos.addClientProperty(XBMessage.addToKeyAndCheck(XBPropertyNames.JMS_MESSAGE_TYPE), XBMessage.OBJECT);
         ObjectMessage objMsg = (ObjectMessage)msg;
         ByteArrayOutputStream baos = new ByteArrayOutputStream();
View Full Code Here

Examples of javax.jms.BytesMessage.readBytes()

        {
            BytesMessage msg = (BytesMessage)message;

            //only handles responses up to 2^31-1 bytes long
            byte[] data = new byte[(int) msg.getBodyLength()];
            msg.readBytes(data);
            BBDecoder decoder = new BBDecoder();
            decoder.init(ByteBuffer.wrap(data));
            return (List<T>)decoder.readList();
        }
        else if (message instanceof MapMessage)
View Full Code Here

Examples of javax.jms.BytesMessage.readBytes()

        }
        if (message instanceof BytesMessage) {
            final BytesMessage bmsg = (BytesMessage)message;
            final int len = (int)bmsg.getBodyLength();
            final byte[] data = new byte[len];
            bmsg.readBytes(data, len);
            return NIOConverter.toByteBuffer(data);

        }
        if (message instanceof StreamMessage) {
            final StreamMessage msg = (StreamMessage)message;
View Full Code Here

Examples of javax.jms.BytesMessage.readBytes()

                    if (bytesMessage.getBodyLength() > Integer.MAX_VALUE) {
                        LOGGER.warn("Length of BytesMessage is too long: {}", bytesMessage.getBodyLength());
                        return null;
                    }
                    byte[] result = new byte[(int)bytesMessage.getBodyLength()];
                    bytesMessage.readBytes(result);
                    bodyMessage.setHeader(JMS_MESSAGE_TYPE, JmsMessageType.Bytes);
                    bodyMessage.setBody(result);
                    break;
                case Map:
                    Map<String, Object> body = new HashMap<String, Object>();
View Full Code Here

Examples of javax.jms.MapMessage.readBytes()

        } else if ( message instanceof BytesMessage ) {
            BytesMessage m = createBytesMessage ();
            BytesMessage src = (BytesMessage) message;
            final int LEN = 100;
            byte[] buf = new byte[LEN];
            int bytesRead = src.readBytes ( buf );
            while ( bytesRead >= 0 ) {
                m.writeBytes ( buf, 0, bytesRead );
                bytesRead = src.readBytes ( buf );
            }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.