ByteBuf implementation which allows to wrap an array of ByteBuf in a read-only mode.
This is useful to write an array of ByteBufs.
| Modifier and Type | Class and Description |
|---|---|
| private static class |
| Modifier and Type | Field and Description |
|---|---|
| private final ByteBufAllocator | |
| private final ByteBuf[] | |
| private final int | |
| private final boolean | |
| private static final ByteBuf[] | |
| private final int | |
| private final ByteOrder |
| Access | Constructor and Description |
|---|---|
| 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 | |
| public ByteBufAllocator | alloc()
Implements abstract io. ByteBufAllocator which created this buffer.
|
| public byte[] | array()
Implements abstract io. |
| public int | arrayOffset()
Implements abstract io. |
| private ByteBuf | |
| public int | capacity()
Implements abstract io. |
| public ByteBuf | capacity(int newCapacity)
Implements abstract io. |
| public ByteBuf | copy(int index, int length)
Implements abstract io. |
| protected void | deallocate()
Implements abstract io. refCnt() is equals 0.
|
| public ByteBuf | discardReadBytes()
Overrides io. readerIndex.
|
| private FixedCompositeByteBuf. | |
| public byte | getByte(int index)
Overrides io. index in this buffer.
|
| public ByteBuf | 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 ByteBuf | getBytes(int index, ByteBuffer dst)
Implements abstract io. index until the destination's position
reaches its limit.
|
| public ByteBuf | 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 ByteBuf | getBytes(int index, OutputStream out, int
the number of bytes to transfer length)Implements abstract 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 ByteBuffer | internalNioBuffer(int index, int length)
Implements abstract io. |
| public boolean | isDirect()
Implements abstract io. true if and only if this buffer is backed by an
NIO direct buffer.
|
| public boolean | isWritable()
Overrides io. true
if and only if (this.capacity - this.writerIndex) is greater
than 0.
|
| public boolean | isWritable(int size)
Overrides io. true if and only if this buffer has enough room to allow writing the specified number of
elements.
|
| public int | maxCapacity()
Overrides io. |
| public long | memoryAddress()
Implements abstract io. |
| 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 ByteOrder | |
| public ByteBuf | setByte(int index, int value)
Overrides io. index in this
buffer.
|
| public ByteBuf | 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 ByteBuf | setBytes(int index, byte[] src, int srcIndex, int length)
Implements abstract io. index.
|
| public ByteBuf | setBytes(int index, ByteBuffer src)
Implements abstract io. index until the source buffer's position
reaches its limit.
|
| 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 ByteBuf | setInt(int index, int value)
Overrides io. index in this buffer.
|
| public ByteBuf | setLong(int index, long value)
Overrides io. index in this buffer.
|
| public ByteBuf | setMedium(int index, int value)
Overrides io. index in this buffer.
|
| public ByteBuf | setShort(int index, int value)
Overrides io. index in this buffer.
|
| public String | toString()
Overrides io. |
| public ByteBuf | unwrap()
Implements abstract io. |