@Test public void testHasRemaining() { ByteBuf buffer = Unpooled.buffer(100, 100); AmqpWritableBuffer writable = new AmqpWritableBuffer(buffer); assertTrue(writable.hasRemaining()); writable.put((byte) 0); assertTrue(writable.hasRemaining()); buffer.writerIndex(buffer.maxCapacity()); assertFalse(writable.hasRemaining()); }
@Override public boolean hasRemaining() { return nettyBuffer.writerIndex() < nettyBuffer.maxCapacity(); }
AmqpWritableBuffer implements WritableBuffer { @Override public boolean hasRemaining() { return nettyBuffer.writerIndex() < nettyBuffer.maxCapacity(); } }
AmqpWritableBuffer implements WritableBuffer { @Override public boolean hasRemaining() { return nettyBuffer.writerIndex() < nettyBuffer.maxCapacity(); } AmqpWritableBuffer();  AmqpWritableBuffer(ByteBuf buffer); }
AmqpWritableBuffer implements WritableBuffer { @Override public boolean hasRemaining() { return nettyBuffer.writerIndex() < nettyBuffer.maxCapacity(); } AmqpWritableBuffer();  AmqpWritableBuffer(ByteBuf buffer); ByteBuf getBuffer(); @Override void put(byte b); @Override void putFloat(float f); @Override void putDouble(double d); @Override void put(byte[] src, int offset, int length); @Override void put(ByteBuffer payload); void put(ByteBuf payload); @Override void putShort(short s); @Override void putInt(int i); @Override void putLong(long l); @Override void put(String value); @Override boolean hasRemaining(); @Override int remaining(); @Override void ensureRemaining(int remaining); @Override int position(); @Override void position(int position); @Override int limit(); @Override void put(ReadableBuffer buffer); }
AmqpWritableBuffer implements WritableBuffer { @Override public boolean hasRemaining() { return nettyBuffer.writerIndex() < nettyBuffer.maxCapacity(); } AmqpWritableBuffer();  AmqpWritableBuffer(ByteBuf buffer); ByteBuf getBuffer(); @Override void put(byte b); @Override void putFloat(float f); @Override void putDouble(double d); @Override void put(byte[] src, int offset, int length); @Override void put(ByteBuffer payload); void put(ByteBuf payload); @Override void putShort(short s); @Override void putInt(int i); @Override void putLong(long l); @Override void put(String value); @Override boolean hasRemaining(); @Override int remaining(); @Override void ensureRemaining(int remaining); @Override int position(); @Override void position(int position); @Override int limit(); @Override void put(ReadableBuffer buffer); static final int INITIAL_CAPACITY; public ByteBuf nettyBuffer; }