Package voldemort.common.nio

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


     * 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

     *        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

Related Classes of voldemort.common.nio.ByteBufferBackedInputStream

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.