Examples of ByteBufferBackedInputStream


Examples of com.facebook.presto.jdbc.internal.jackson.databind.util.ByteBufferBackedInputStream

        // But should we rewind it; and/or make a copy?
        ByteBuffer copy = bbuf.asReadOnlyBuffer();
        if (copy.position() > 0) {
            copy.rewind();
        }
        InputStream in = new ByteBufferBackedInputStream(copy);
        gen.writeBinary(in, copy.remaining());
        in.close();
    }
View Full Code Here

Examples of com.fasterxml.jackson.databind.util.ByteBufferBackedInputStream

        // But should we rewind it; and/or make a copy?
        ByteBuffer copy = bbuf.asReadOnlyBuffer();
        if (copy.position() > 0) {
            copy.rewind();
        }
        InputStream in = new ByteBufferBackedInputStream(copy);
        gen.writeBinary(in, copy.remaining());
        in.close();
    }
View Full Code Here

Examples of voldemort.common.nio.ByteBufferBackedInputStream

        output.writeInt(key.length());
        output.write(key.get());
    }

    private boolean isCompleteResponse(ByteBuffer buffer, byte opCode) {
        DataInputStream inputStream = new DataInputStream(new ByteBufferBackedInputStream(buffer));

        try {
            try {
                switch(opCode) {
                    case VoldemortOpCode.GET_OP_CODE:
View Full Code Here

Examples of voldemort.common.nio.ByteBufferBackedInputStream

     * This is pretty ugly. We end up mimicking the request logic here, so this
     * needs to stay in sync with handleRequest.
     */

    public boolean isCompleteRequest(final ByteBuffer buffer) {
        DataInputStream inputStream = new DataInputStream(new ByteBufferBackedInputStream(buffer));

        try {
            byte opCode = inputStream.readByte();

            // Read the store name in, but just to skip the bytes.
View Full Code Here

Examples of voldemort.common.nio.ByteBufferBackedInputStream

     *        returns
     * @return True if the buffer holds a complete request, false otherwise
     */
    @Override
    public boolean isCompleteRequest(ByteBuffer buffer) {
        DataInputStream inputStream = new DataInputStream(new ByteBufferBackedInputStream(buffer));

        try {
            int dataSize = inputStream.readInt();

            if(logger.isTraceEnabled())
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.