| Modifier and Type | Field and Description |
|---|---|
| pack-priv static final boolean | |
| private static final boolean | |
| pack-priv static final ResourceLeakDetector | |
| private static final String | |
| private static final InternalLogger | |
| private int | |
| private int | |
| private int | |
| private static final String | |
| private static final String | |
| pack-priv int | |
| pack-priv int |
| Access | Constructor and Description |
|---|---|
| protected |
| Modifier and Type | Method and Description |
|---|---|
| protected abstract byte | |
| protected abstract int | |
| protected abstract int | |
| protected abstract long | |
| protected abstract long | |
| protected abstract short | |
| protected abstract short | |
| protected abstract int | |
| protected abstract int | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected abstract void | |
| protected final void | |
| public ByteBuf | asReadOnly()
Implements abstract io. |
| public int | bytesBefore(byte value)
Implements abstract io. value in this
buffer.
|
| public int | bytesBefore(int length, byte value)
Implements abstract io. value in this
buffer.
|
| public int | bytesBefore(int index, int length, byte value)
Implements abstract io. value in this
buffer.
|
| protected final void | |
| protected final void | |
| protected final void | |
| protected final void | |
| pack-priv final void | |
| private static void | |
| protected final void | |
| private static void | checkRangeBounds(final String indexName, final int index, final int fieldLength, final int capacity)
|
| private static void | |
| protected final void | checkReadableBytes(int minimumReadableBytes)
Throws an |
| private void | |
| protected final void | |
| public ByteBuf | clear()
Implements abstract io. readerIndex and writerIndex of this buffer to
0.
|
| public int | compareTo(ByteBuf
the object to be compared. that)Implements abstract io. Implements java. |
| public ByteBuf | copy()
Implements abstract io. |
| pack-priv final void | |
| public ByteBuf | discardReadBytes()
Implements abstract io. readerIndex.
|
| public ByteBuf | discardSomeReadBytes()
Implements abstract 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.
|
| public ByteBuf | duplicate()
Implements abstract io. |
| protected final void | ensureAccessible()
Should be called by every method that tries to access the buffers content to check if the buffer was released before. |
| public ByteBuf | ensureWritable(int
the expected minimum number of writable bytes minWritableBytes)Implements abstract io. capacity() to make sure the number of
writable bytes is equal to or greater than the
specified value.
|
| public int | ensureWritable(int
the expected minimum number of writable bytes minWritableBytes, boolean When force)writerIndex() + minWritableBytes > maxCapacity():
Implements abstract io. capacity() to make sure the number of
writable bytes is equal to or greater than the
specified value.
|
| pack-priv final void | |
| public boolean | equals(Object
the reference object with which to compare. o)Implements abstract io. |
| public int | forEachByte(ByteProcessor processor)
Implements abstract io. processor in ascending order.
|
| public int | forEachByte(int index, int length, ByteProcessor processor)
Implements abstract io. processor in ascending order.
|
| pack-priv int | |
| public int | forEachByteDesc(ByteProcessor processor)
Implements abstract io. processor in descending order.
|
| public int | forEachByteDesc(int index, int length, ByteProcessor processor)
Implements abstract io. processor in descending order.
|
| pack-priv int | |
| public boolean | getBoolean(int index)
Implements abstract io. |
| public byte | getByte(int index)
Implements abstract io. index in this buffer.
|
| public ByteBuf | getBytes(int index, byte[] dst)
Implements abstract io. index.
|
| public ByteBuf | getBytes(int index, ByteBuf dst)
Implements abstract io. index until the destination becomes
non-writable.
|
| public ByteBuf | getBytes(int index, ByteBuf dst, int
the number of bytes to transfer length)Implements abstract io. index.
|
| public char | getChar(int index)
Implements abstract io. index in this buffer.
|
| public CharSequence | getCharSequence(int index, int
the length to read length, Charset that should be used charset)Implements abstract io. CharSequence with the given length at the given index.
|
| public double | getDouble(int index)
Implements abstract io. index in this buffer.
|
| public float | getFloat(int index)
Implements abstract io. index in this buffer.
|
| public int | getInt(int index)
Implements abstract io. index in
this buffer.
|
| public int | getIntLE(int index)
Implements abstract io. index in
this buffer with Little Endian Byte Order.
|
| public long | getLong(int index)
Implements abstract io. index in
this buffer.
|
| public long | getLongLE(int index)
Implements abstract io. index in
this buffer in Little Endian Byte Order.
|
| public int | getMedium(int index)
Implements abstract io. index in
this buffer.
|
| public int | getMediumLE(int index)
Implements abstract io. index in
this buffer in the Little Endian Byte Order.
|
| public short | getShort(int index)
Implements abstract io. index in
this buffer.
|
| public short | getShortLE(int index)
Implements abstract io. index in
this buffer in Little Endian Byte Order.
|
| public short | getUnsignedByte(int index)
Implements abstract io. index in this
buffer.
|
| public long | getUnsignedInt(int index)
Implements abstract io. index
in this buffer.
|
| public long | getUnsignedIntLE(int index)
Implements abstract io. index
in this buffer in Little Endian Byte Order.
|
| public int | getUnsignedMedium(int index)
Implements abstract io. index in this buffer.
|
| public int | getUnsignedMediumLE(int index)
Implements abstract io. index in this buffer in Little Endian Byte Order.
|
| public int | getUnsignedShort(int index)
Implements abstract io. index in this buffer.
|
| public int | getUnsignedShortLE(int index)
Implements abstract io. index in this buffer in Little Endian Byte Order.
|
| public int | hashCode()
Implements abstract io. |
| public int | indexOf(int fromIndex, int toIndex, byte value)
Implements abstract io. value in this
buffer.
|
| public boolean | isReadable()
Implements abstract io. true
if and only if (this.writerIndex - this.readerIndex) is greater
than 0.
|
| public boolean | isReadable(int numBytes)
Implements abstract io. true if and only if this buffer contains equal to or more than the specified number of elements.
|
| public boolean | isReadOnly()
Implements abstract io. true if and only if this buffer is read-only.
|
| public boolean | isWritable()
Implements abstract io. true
if and only if (this.capacity - this.writerIndex) is greater
than 0.
|
| public boolean | isWritable(int numBytes)
Implements abstract io. true if and only if this buffer has enough room to allow writing the specified number of
elements.
|
| public ByteBuf | markReaderIndex()
Implements abstract io. readerIndex in this buffer.
|
| public ByteBuf | markWriterIndex()
Implements abstract io. writerIndex in this buffer.
|
| public int | maxCapacity()
Implements abstract io. |
| protected final void | |
| public int | maxWritableBytes()
Implements abstract io. (this.maxCapacity - this.writerIndex).
|
| protected SwappedByteBuf | newSwappedByteBuf()
Deprecated
as a consequence of
Creates a new SwappedByteBuf being deprecated.
SwappedByteBuf for this ByteBuf instance.
|
| public ByteBuffer | nioBuffer()
Implements abstract io. ByteBuffer.
|
| public ByteBuffer[] | nioBuffers()
Implements abstract io. ByteBuffer's.
|
| public ByteBuf | order(ByteOrder endianness)
Implements abstract io. endianness which shares the whole region,
indexes, and marks of this buffer.
|
| public int | readableBytes()
Implements abstract io. (this.writerIndex - this.readerIndex).
|
| public boolean | readBoolean()
Implements abstract io. readerIndex and increases
the readerIndex by 1 in this buffer.
|
| public byte | readByte()
Implements abstract io. readerIndex and increases
the readerIndex by 1 in this buffer.
|
| public ByteBuf | readBytes(int
the number of bytes to transfer length)Implements abstract io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | readBytes(byte[] dst, int
the first index of the destination dstIndex, int the number of bytes to transfer length)Implements abstract io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | readBytes(byte[] dst)
Implements abstract io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= dst.length).
|
| public ByteBuf | readBytes(ByteBuf dst)
Implements abstract io. readerIndex until the destination becomes
non-writable, and increases the readerIndex by the number of the
transferred bytes.
|
| public ByteBuf | readBytes(ByteBuf dst, int length)
Implements abstract io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | readBytes(ByteBuf dst, int
the first index of the destination dstIndex, int the number of bytes to transfer length)Implements abstract io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | readBytes(ByteBuffer dst)
Implements abstract io. readerIndex until the destination's position
reaches its limit, and increases the readerIndex by the
number of the transferred bytes.
|
| public int | readBytes(GatheringByteChannel out, int
the maximum number of bytes to transfer length)Implements abstract io. readerIndex.
|
| public int | readBytes(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. readerIndex
to the specified channel starting at the given file position.
|
| public ByteBuf | readBytes(OutputStream out, int
the number of bytes to transfer length)Implements abstract io. readerIndex.
|
| public char | readChar()
Implements abstract io. readerIndex
and increases the readerIndex by 2 in this buffer.
|
| public CharSequence | readCharSequence(int
the length to read length, Charset that should be used charset)Implements abstract io. CharSequence with the given length at the current readerIndex
and increases the readerIndex by the given length.
|
| public double | readDouble()
Implements abstract io. readerIndex
and increases the readerIndex by 8 in this buffer.
|
| public int | readerIndex()
Implements abstract io. readerIndex of this buffer.
|
| public ByteBuf | readerIndex(int readerIndex)
Implements abstract io. readerIndex of this buffer.
|
| public float | readFloat()
Implements abstract io. readerIndex
and increases the readerIndex by 4 in this buffer.
|
| public int | readInt()
Implements abstract io. readerIndex
and increases the readerIndex by 4 in this buffer.
|
| public int | readIntLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer.
|
| public long | readLong()
Implements abstract io. readerIndex
and increases the readerIndex by 8 in this buffer.
|
| public long | readLongLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 8 in this buffer.
|
| public int | readMedium()
Implements abstract io. readerIndex
and increases the readerIndex by 3 in this buffer.
|
| public int | readMediumLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the
readerIndex by 3 in this buffer.
|
| public ByteBuf | readRetainedSlice(int
the size of the new slice length)Implements abstract io. readerIndex and increases the readerIndex by the size
of the new slice (= length).
|
| public short | readShort()
Implements abstract io. readerIndex
and increases the readerIndex by 2 in this buffer.
|
| public short | readShortLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer.
|
| public ByteBuf | readSlice(int
the size of the new slice length)Implements abstract io. readerIndex and increases the readerIndex by the size
of the new slice (= length).
|
| public short | readUnsignedByte()
Implements abstract io. readerIndex and increases
the readerIndex by 1 in this buffer.
|
| public long | readUnsignedInt()
Implements abstract io. readerIndex
and increases the readerIndex by 4 in this buffer.
|
| public long | readUnsignedIntLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 4 in this buffer.
|
| public int | readUnsignedMedium()
Implements abstract io. readerIndex
and increases the readerIndex by 3 in this buffer.
|
| public int | readUnsignedMediumLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 3 in this buffer.
|
| public int | readUnsignedShort()
Implements abstract io. readerIndex
and increases the readerIndex by 2 in this buffer.
|
| public int | readUnsignedShortLE()
Implements abstract io. readerIndex
in the Little Endian Byte Order and increases the readerIndex
by 2 in this buffer.
|
| public ByteBuf | resetReaderIndex()
Implements abstract io. readerIndex to the marked
readerIndex in this buffer.
|
| public ByteBuf | resetWriterIndex()
Implements abstract io. writerIndex to the marked
writerIndex in this buffer.
|
| public ByteBuf | retainedDuplicate()
Implements abstract io. |
| public ByteBuf | retainedSlice()
Implements abstract io. |
| public ByteBuf | retainedSlice(int index, int length)
Implements abstract io. |
| public ByteBuf | setBoolean(int index, boolean value)
Implements abstract io. index in this
buffer.
|
| public ByteBuf | setByte(int index, int value)
Implements abstract io. index in this
buffer.
|
| public ByteBuf | setBytes(int index, byte[] src)
Implements abstract io. index.
|
| public ByteBuf | setBytes(int index, ByteBuf src)
Implements abstract io. index until the source buffer becomes
unreadable.
|
| public ByteBuf | setBytes(int index, ByteBuf src, int
the number of bytes to transfer length)Implements abstract io. index.
|
| public ByteBuf | setChar(int index, int value)
Implements abstract io. index in this buffer.
|
| public int | setCharSequence(int
on which the sequence should be written index, CharSequence to write sequence, Charset that should be used. charset)Implements abstract io. CharSequence at the given index.
|
| private int | |
| public ByteBuf | setDouble(int index, double value)
Implements abstract io. index in this buffer.
|
| public ByteBuf | setFloat(int index, float value)
Implements abstract io. index in this buffer.
|
| public ByteBuf | setIndex(int readerIndex, int writerIndex)
Implements abstract io. readerIndex and writerIndex of this buffer
in one shot.
|
| pack-priv final void | |
| public ByteBuf | setInt(int index, int value)
Implements abstract io. index in this buffer.
|
| public ByteBuf | setIntLE(int index, int value)
Implements abstract io. index in this buffer with Little Endian byte order
.
|
| public ByteBuf | setLong(int index, long value)
Implements abstract io. index in this buffer.
|
| public ByteBuf | setLongLE(int index, long value)
Implements abstract io. index in this buffer in Little Endian Byte Order.
|
| public ByteBuf | setMedium(int index, int value)
Implements abstract io. index in this buffer.
|
| public ByteBuf | setMediumLE(int index, int value)
Implements abstract io. index in this buffer in the Little Endian Byte Order.
|
| public ByteBuf | setShort(int index, int value)
Implements abstract io. index in this buffer.
|
| public ByteBuf | setShortLE(int index, int value)
Implements abstract io. index in this buffer with the Little Endian Byte Order.
|
| public ByteBuf | setZero(int index, int
the number of NULs to write to the buffer length)Implements abstract io. index.
|
| public ByteBuf | skipBytes(int length)
Implements abstract io. readerIndex by the specified
length in this buffer.
|
| public ByteBuf | slice()
Implements abstract io. |
| public ByteBuf | slice(int index, int length)
Implements abstract io. |
| public String | toString(Charset charset)
Implements abstract io. |
| public String | toString(int index, int length, Charset charset)
Implements abstract io. |
| public String | toString()
Implements abstract io. |
| protected final void | |
| public int | writableBytes()
Implements abstract io. (this.capacity - this.writerIndex).
|
| public ByteBuf | writeBoolean(boolean value)
Implements abstract io. writerIndex
and increases the writerIndex by 1 in this buffer.
|
| public ByteBuf | writeByte(int value)
Implements abstract io. writerIndex
and increases the writerIndex by 1 in this buffer.
|
| public ByteBuf | writeBytes(byte[] src, int
the first index of the source srcIndex, int the number of bytes to transfer length)Implements abstract io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | writeBytes(byte[] src)
Implements abstract io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= src.length).
|
| public ByteBuf | writeBytes(ByteBuf src)
Implements abstract io. writerIndex until the source buffer becomes
unreadable, and increases the writerIndex by the number of
the transferred bytes.
|
| public ByteBuf | writeBytes(ByteBuf src, int
the number of bytes to transfer length)Implements abstract io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | writeBytes(ByteBuf src, int
the first index of the source srcIndex, int the number of bytes to transfer length)Implements abstract io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= length).
|
| public ByteBuf | writeBytes(ByteBuffer src)
Implements abstract io. writerIndex until the source buffer's position
reaches its limit, and increases the writerIndex by the
number of the transferred bytes.
|
| public int | writeBytes(InputStream in, int
the number of bytes to transfer length)Implements abstract io. writerIndex and increases the
writerIndex by the number of the transferred bytes.
|
| public int | writeBytes(ScatteringByteChannel in, int
the maximum number of bytes to transfer length)Implements abstract io. writerIndex and increases the
writerIndex by the number of the transferred bytes.
|
| public int | writeBytes(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. writerIndex and increases the
writerIndex by the number of the transferred bytes.
|
| public ByteBuf | writeChar(int value)
Implements abstract io. writerIndex and increases the writerIndex by 2
in this buffer.
|
| public int | writeCharSequence(CharSequence
to write sequence, Charset that should be used charset)Implements abstract io. CharSequence at the current writerIndex and increases
the writerIndex by the written bytes.
|
| public ByteBuf | writeDouble(double value)
Implements abstract io. writerIndex and increases the writerIndex by 8
in this buffer.
|
| public ByteBuf | writeFloat(float value)
Implements abstract io. writerIndex and increases the writerIndex by 4
in this buffer.
|
| public ByteBuf | writeInt(int value)
Implements abstract io. writerIndex
and increases the writerIndex by 4 in this buffer.
|
| public ByteBuf | writeIntLE(int value)
Implements abstract io. writerIndex
in the Little Endian Byte Order and increases the writerIndex
by 4 in this buffer.
|
| public ByteBuf | writeLong(long value)
Implements abstract io. writerIndex and increases the writerIndex by 8
in this buffer.
|
| public ByteBuf | writeLongLE(long value)
Implements abstract io. writerIndex in the Little Endian Byte Order and
increases the writerIndex by 8
in this buffer.
|
| public ByteBuf | writeMedium(int value)
Implements abstract io. writerIndex and increases the writerIndex by 3
in this buffer.
|
| public ByteBuf | writeMediumLE(int value)
Implements abstract io. writerIndex in the Little Endian Byte Order and
increases the writerIndex by 3 in this
buffer.
|
| public int | writerIndex()
Implements abstract io. writerIndex of this buffer.
|
| public ByteBuf | writerIndex(int writerIndex)
Implements abstract io. writerIndex of this buffer.
|
| public ByteBuf | writeShort(int value)
Implements abstract io. writerIndex and increases the writerIndex by 2
in this buffer.
|
| public ByteBuf | writeShortLE(int value)
Implements abstract io. writerIndex and increases the
writerIndex by 2 in this buffer.
|
| public ByteBuf | writeZero(int
the number of NULs to write to the buffer length)Implements abstract io. writerIndex and increases the writerIndex by the
specified length.
|