Package org.fusesource.hawtbuf

Examples of org.fusesource.hawtbuf.Buffer.toByteBuffer()


                if (command.getClass() == AmqpHeader.class) {
                    buffer = ((AmqpHeader) command).getBuffer();
                } else {
                    buffer = (Buffer) command;
                }
                ByteBuffer bbuffer = buffer.toByteBuffer();
                do {
                  ByteBuffer input = protonTransport.getInputBuffer();
                  ByteBufferUtils.pour(bbuffer, input);
                  protonTransport.processInput();
                } while (bbuffer.remaining() > 0);
View Full Code Here


     * @throws IOException
     * @throws IllegalStateException
     */
    public ByteBuffer read(Location location) throws IOException, IllegalStateException {
        Buffer buffer = accessor.readLocation(location);
        return buffer.toByteBuffer();
    }

    /**
     * Write the given byte buffer record, either sync or async, and returns the stored {@link Location}.<br/>
     * A sync write causes all previously batched async writes to be synced too.
View Full Code Here

            return BufferState.FULL;
        } else {
            boolean wasEmpty = empty();
            Buffer buffer = (Buffer) value;
            next_write_size += buffer.length;
            next_write_buffers.add(buffer.toByteBuffer());
            return wasEmpty ? BufferState.WAS_EMPTY : BufferState.NOT_EMPTY;
        }
    }

    public BufferState flush() throws IOException {
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.