ByteBufAllocator#compositeBuffer() or Unpooled#wrappedBuffer(ByteBuf...) instead of calling the
constructor explicitly.
| Modifier and Type | Class and Description |
|---|---|
| pack-priv static interface | |
| private static class | |
| private class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufAllocator | |
| pack-priv static final CompositeByteBuf. | |
| pack-priv static final CompositeByteBuf. | |
| private int | |
| private CompositeByteBuf. | |
| private final boolean | |
| private static final Iterator | |
| private static final ByteBuffer | |
| private boolean | |
| private CompositeByteBuf. | |
| private final int |
| Access | Constructor and Description |
|---|---|
| private | |
| public | |
| public | |
| pack-priv | CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, ByteBuf[] buffers, int offset)
|
| public | CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, Iterable<ByteBuf> buffers)
|
| pack-priv <T> | CompositeByteBuf(ByteBufAllocator alloc, boolean direct, int maxNumComponents, CompositeByteBuf.
|
| pack-priv |
| Modifier and Type | Method and Description |
|---|---|
| protected byte | |
| protected int | |
| protected int | |
| protected long | |
| protected long | |
| protected short | |
| protected short | |
| protected int | _getUnsignedMedium(int index)
Implements abstract io. |
| protected int | _getUnsignedMediumLE(int index)
Implements abstract io. |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| protected void | |
| private void | |
| public CompositeByteBuf | |
| public CompositeByteBuf | addComponent(int
the index on which the cIndex, ByteBuf buffer)ByteBuf will be added.Add the given |
| public CompositeByteBuf | addComponent(boolean increaseWriterIndex, ByteBuf buffer)
Add the given |
| public CompositeByteBuf | addComponent(boolean increaseWriterIndex, int
the index on which the cIndex, ByteBuf buffer)ByteBuf will be added.Add the given |
| private int | addComponent0(boolean increaseWriterIndex, int cIndex, ByteBuf buffer)
Precondition is that |
| public CompositeByteBuf | addComponents(ByteBuf...
the buffers)ByteBufs to add. ByteBuf#release() ownership of all ByteBuf#release()
ownership of all ByteBuf objects is transferred to this CompositeByteBuf.Add the given |
| public CompositeByteBuf | addComponents(Iterable<ByteBuf>
the buffers)ByteBufs to add. ByteBuf#release() ownership of all ByteBuf#release()
ownership of all ByteBuf objects is transferred to this CompositeByteBuf.Add the given |
| public CompositeByteBuf | addComponents(boolean increaseWriterIndex, ByteBuf...
the buffers)ByteBufs to add. ByteBuf#release() ownership of all ByteBuf#release()
ownership of all ByteBuf objects is transferred to this CompositeByteBuf.Add the given |
| public CompositeByteBuf | addComponents(boolean increaseWriterIndex, Iterable<ByteBuf>
the buffers)ByteBufs to add. ByteBuf#release() ownership of all ByteBuf#release()
ownership of all ByteBuf objects is transferred to this CompositeByteBuf.Add the given |
| public CompositeByteBuf | addComponents(int
the index on which the cIndex, ByteBuf... ByteBuf will be added. ByteBuf#release() ownership of all
ByteBuf#release() ownership of all ByteBuf objects is transferred to this
CompositeByteBuf.the buffers)ByteBufs to add. ByteBuf#release() ownership of all ByteBuf#release()
ownership of all ByteBuf objects is transferred to this CompositeByteBuf.Add the given
Be aware that this method does not increase the |
| public CompositeByteBuf | addComponents(int
the index on which the cIndex, Iterable<ByteBuf> ByteBuf will be added.the buffers)ByteBufs to add. ByteBuf#release() ownership of all
ByteBuf#release() ownership of all ByteBuf objects is transferred to this
CompositeByteBuf.Add the given |
| private CompositeByteBuf | |
| private CompositeByteBuf | |
| private <T> int | addComponents0(boolean increaseWriterIndex, int cIndex, CompositeByteBuf.
|
| public CompositeByteBuf | addFlattenedComponents(boolean increaseWriterIndex, ByteBuf buffer)
Add the given |
| public ByteBufAllocator | alloc()
Implements abstract io. ByteBufAllocator which created this buffer.
|
| private ByteBuf | |
| public byte[] | array()
Implements abstract io. |
| public int | arrayOffset()
Implements abstract io. |
| public int | capacity()
Implements abstract io. |
| public CompositeByteBuf | capacity(int newCapacity)
Implements abstract io. |
| private void | |
| private void | |
| private static void | |
| public CompositeByteBuf | clear()
Overrides io. readerIndex and writerIndex of this buffer to
0.
|
| private void | |
| public ByteBuf | |
| public ByteBuf | Returns: theByteBuf on the specified indexthe offset for which the offset)ByteBuf should be returnedReturn the |
| public CompositeByteBuf | |
| public CompositeByteBuf | consolidate(int
the index on which to start to compose cIndex, int the number of components to compose numComponents)Consolidate the composed |
| private void | |
| private void | consolidateIfNeeded()
This should only be called as last operation from a method as this may adjust the underlying array of components and so affect the index etc. |
| public ByteBuf | copy(int index, int length)
Implements abstract io. |
| private void | |
| protected void | deallocate()
Implements abstract io. refCnt() is equals 0.
|
| public List | |
| public CompositeByteBuf | discardReadBytes()
Overrides io. readerIndex.
|
| public CompositeByteBuf | |
| public CompositeByteBuf | discardSomeReadBytes()
Overrides io. ByteBuf#discardReadBytes() except that this method might discard
some, all, or none of read bytes depending on its internal implementation to reduce
overall memory bandwidth consumption at the cost of potentially additional memory
consumption.
|
| private static ByteBuf | |
| public CompositeByteBuf | ensureWritable(int
the expected minimum number of writable bytes minWritableBytes)Overrides io. capacity() to make sure the number of
writable bytes is equal to or greater than the
specified value.
|
| private CompositeByteBuf. | |
| private CompositeByteBuf. | |
| private CompositeByteBuf. | |
| protected int | forEachByteAsc0(int start, int end, ByteProcessor processor)
|
| protected int | forEachByteDesc0(int rStart, int rEnd, ByteProcessor processor)
|
| public byte | getByte(int index)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | getBytes(int index, byte[] dst, int
the first index of the destination dstIndex, int the number of bytes to transfer length)Implements abstract io. index.
|
| public CompositeByteBuf | getBytes(int index, ByteBuffer dst)
Implements abstract io. index until the destination's position
reaches its limit.
|
| public CompositeByteBuf | getBytes(int index, ByteBuf dst, int
the first index of the destination dstIndex, int the number of bytes to transfer length)Implements abstract io. index.
|
| public int | getBytes(int index, GatheringByteChannel out, int
the maximum number of bytes to transfer length)Implements abstract io. index.
|
| public int | getBytes(int index, FileChannel out, long
the file position at which the transfer is to begin position, int the maximum number of bytes to transfer length)Implements abstract io. index
to the specified channel starting at the given file position.
|
| public CompositeByteBuf | getBytes(int index, OutputStream out, int
the number of bytes to transfer length)Implements abstract io. index.
|
| public CompositeByteBuf | getBytes(int index, ByteBuf dst)
Overrides io. index until the destination becomes
non-writable.
|
| public CompositeByteBuf | getBytes(int index, ByteBuf dst, int
the number of bytes to transfer length)Overrides io. index.
|
| public CompositeByteBuf | getBytes(int index, byte[] dst)
Overrides io. index.
|
| public boolean | hasArray()
Implements abstract io. true if and only if this buffer has a backing byte array.
|
| public boolean | hasMemoryAddress()
Implements abstract io. true if and only if this buffer has a reference to the low-level memory address that points
to the backing data.
|
| public ByteBuf | internalComponent(int
the index for which the cIndex)ByteBuf should be returnedReturn the internal |
| public ByteBuf | internalComponentAtOffset(int
the offset for which the offset)ByteBuf should be returnedReturn the internal |
| public ByteBuffer | internalNioBuffer(int index, int length)
Implements abstract io. |
| pack-priv boolean | isAccessible()
Overrides io. AbstractByteBuf#ensureAccessible() to try to guard
against using the buffer after it was released (best-effort).
|
| public boolean | isDirect()
Implements abstract io. true if and only if this buffer is backed by an
NIO direct buffer.
|
| public Iterator | |
| public CompositeByteBuf | markReaderIndex()
Overrides io. readerIndex in this buffer.
|
| public CompositeByteBuf | markWriterIndex()
Overrides io. writerIndex in this buffer.
|
| public int | |
| public long | memoryAddress()
Implements abstract io. |
| private static CompositeByteBuf. | |
| private CompositeByteBuf. | |
| public ByteBuffer | nioBuffer(int index, int length)
Implements abstract io. ByteBuffer.
|
| public int | nioBufferCount()
Implements abstract io. ByteBuffers that consist this buffer.
|
| public ByteBuffer[] | nioBuffers(int index, int length)
Implements abstract io. ByteBuffer's for the specified index and length
The returned buffer either share or contains the copied content of this buffer, while changing
the position and limit of the returned NIO buffer does not affect the indexes and marks of this buffer.
|
| public ByteBuffer[] | nioBuffers()
Overrides io. ByteBuffer's.
|
| public int | |
| public ByteOrder | |
| public CompositeByteBuf | readBytes(ByteBuf dst)
Overrides io. readerIndex until the destination becomes
non-writable, and increases the readerIndex by the number of the
transferred bytes.
|
| public CompositeByteBuf | readBytes(ByteBuf dst, int length)
Overrides io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public CompositeByteBuf | readBytes(ByteBuf dst, int
the first index of the destination dstIndex, int the number of bytes to transfer length)Overrides io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public CompositeByteBuf | readBytes(byte[] dst)
Overrides io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= dst.length).
|
| public CompositeByteBuf | readBytes(byte[] dst, int
the first index of the destination dstIndex, int the number of bytes to transfer length)Overrides io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public CompositeByteBuf | readBytes(ByteBuffer dst)
Overrides io. readerIndex until the destination's position
reaches its limit, and increases the readerIndex by the
number of the transferred bytes.
|
| public CompositeByteBuf | readBytes(OutputStream out, int
the number of bytes to transfer length)Overrides io. readerIndex.
|
| public CompositeByteBuf | readerIndex(int readerIndex)
Overrides io. readerIndex of this buffer.
|
| private void | |
| public CompositeByteBuf | removeComponent(int
the index on from which the cIndex)ByteBuf will be removeRemove the |
| public CompositeByteBuf | removeComponents(int
the index on which the cIndex, int ByteBufs will be started to removedthe number of components to remove numComponents)Remove the number of |
| private void | |
| public CompositeByteBuf | resetReaderIndex()
Overrides io. readerIndex to the marked
readerIndex in this buffer.
|
| public CompositeByteBuf | resetWriterIndex()
Overrides io. writerIndex to the marked
writerIndex in this buffer.
|
| public CompositeByteBuf | retain(int increment)
Overrides io. Implements io. increment.
|
| public CompositeByteBuf | retain()
Overrides io. Implements io. 1.
|
| public CompositeByteBuf | setBoolean(int index, boolean value)
Overrides io. index in this
buffer.
|
| public CompositeByteBuf | setByte(int index, int value)
Overrides io. index in this
buffer.
|
| public CompositeByteBuf | setBytes(int index, byte[] src, int srcIndex, int length)
Implements abstract io. index.
|
| public CompositeByteBuf | setBytes(int index, ByteBuffer src)
Implements abstract io. index until the source buffer's position
reaches its limit.
|
| public CompositeByteBuf | setBytes(int index, ByteBuf src, int
the first index of the source srcIndex, int the number of bytes to transfer length)Implements abstract io. index.
|
| public int | setBytes(int index, InputStream in, int
the number of bytes to transfer length)Implements abstract io. index.
|
| public int | setBytes(int index, ScatteringByteChannel in, int
the maximum number of bytes to transfer length)Implements abstract io. index.
|
| public int | setBytes(int index, FileChannel in, long
the file position at which the transfer is to begin position, int the maximum number of bytes to transfer length)Implements abstract io. index.
|
| public CompositeByteBuf | setBytes(int index, ByteBuf src)
Overrides io. index until the source buffer becomes
unreadable.
|
| public CompositeByteBuf | setBytes(int index, ByteBuf src, int
the number of bytes to transfer length)Overrides io. index.
|
| public CompositeByteBuf | setBytes(int index, byte[] src)
Overrides io. index.
|
| public CompositeByteBuf | setChar(int index, int value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setDouble(int index, double value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setFloat(int index, float value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setIndex(int readerIndex, int writerIndex)
Overrides io. readerIndex and writerIndex of this buffer
in one shot.
|
| public CompositeByteBuf | setInt(int index, int value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setLong(int index, long value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setMedium(int index, int value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setShort(int index, int value)
Overrides io. index in this buffer.
|
| public CompositeByteBuf | setZero(int index, int
the number of NULs to write to the buffer length)Overrides io. index.
|
| private void | |
| public CompositeByteBuf | skipBytes(int length)
Overrides io. readerIndex by the specified
length in this buffer.
|
| public int | |
| public int | |
| private int | |
| public String | toString()
Overrides io. |
| public CompositeByteBuf | touch()
Overrides io. Implements io. |
| public CompositeByteBuf | touch(Object hint)
Overrides io. Implements io. |
| public ByteBuf | unwrap()
Implements abstract io. |
| private void | |
| public CompositeByteBuf | writeBoolean(boolean value)
Overrides io. writerIndex
and increases the writerIndex by 1 in this buffer.
|
| public CompositeByteBuf | writeByte(int value)
Overrides io. writerIndex
and increases the writerIndex by 1 in this buffer.
|
| public CompositeByteBuf | writeBytes(ByteBuf src)
Overrides io. writerIndex until the source buffer becomes
unreadable, and increases the writerIndex by the number of
the transferred bytes.
|
| public CompositeByteBuf | writeBytes(ByteBuf src, int
the number of bytes to transfer length)Overrides io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= length).
|
| public CompositeByteBuf | writeBytes(ByteBuf src, int
the first index of the source srcIndex, int the number of bytes to transfer length)Overrides io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= length).
|
| public CompositeByteBuf | writeBytes(byte[] src)
Overrides io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= src.length).
|
| public CompositeByteBuf | writeBytes(byte[] src, int
the first index of the source srcIndex, int the number of bytes to transfer length)Overrides io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= length).
|
| public CompositeByteBuf | writeBytes(ByteBuffer src)
Overrides io. writerIndex until the source buffer's position
reaches its limit, and increases the writerIndex by the
number of the transferred bytes.
|
| public CompositeByteBuf | writeChar(int value)
Overrides io. writerIndex and increases the writerIndex by 2
in this buffer.
|
| public CompositeByteBuf | writeDouble(double value)
Overrides io. writerIndex and increases the writerIndex by 8
in this buffer.
|
| public CompositeByteBuf | writeFloat(float value)
Overrides io. writerIndex and increases the writerIndex by 4
in this buffer.
|
| public CompositeByteBuf | writeInt(int value)
Overrides io. writerIndex
and increases the writerIndex by 4 in this buffer.
|
| public CompositeByteBuf | writeLong(long value)
Overrides io. writerIndex and increases the writerIndex by 8
in this buffer.
|
| public CompositeByteBuf | writeMedium(int value)
Overrides io. writerIndex and increases the writerIndex by 3
in this buffer.
|
| public CompositeByteBuf | writerIndex(int writerIndex)
Overrides io. writerIndex of this buffer.
|
| public CompositeByteBuf | writeShort(int value)
Overrides io. writerIndex and increases the writerIndex by 2
in this buffer.
|
| public CompositeByteBuf | writeZero(int
the number of NULs to write to the buffer length)Overrides io. writerIndex and increases the writerIndex by the
specified length.
|