Deprecated
use the Little Endian accessors, e.g. getShortLE, getIntLE
instead.
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public ByteBufAllocator | alloc()
Implements abstract io. ByteBufAllocator which created this buffer.
|
| public byte[] | array()
Implements abstract io. |
| public int | arrayOffset()
Implements abstract io. |
| 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.
|
| public int | capacity()
Implements abstract io. |
| public ByteBuf | capacity(int newCapacity)
Implements abstract io. |
| public ByteBuf | clear()
Implements abstract io. readerIndex and writerIndex of this buffer to
0.
|
| public int | compareTo(ByteBuf
the object to be compared. buffer)Implements abstract io. Implements java. |
| public ByteBuf | copy()
Implements abstract io. |
| public ByteBuf | copy(int index, int length)
Implements abstract io. |
| 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. |
| public ByteBuf | ensureWritable(int
the expected minimum number of writable bytes writableBytes)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.
|
| public boolean | equals(Object
the reference object with which to compare. obj)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.
|
| 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.
|
| 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, 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 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 ByteBuf | getBytes(int index, byte[] dst)
Implements abstract io. index.
|
| 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, OutputStream out, 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 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 boolean | hasArray()
Implements abstract io. true if and only if this buffer has a backing byte array.
|
| public int | hashCode()
Implements abstract io. |
| 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 int | indexOf(int fromIndex, int toIndex, byte value)
Implements abstract io. value in this
buffer.
|
| public ByteBuffer | internalNioBuffer(int index, int length)
Implements abstract io. |
| pack-priv final boolean | isAccessible()
Overrides io. AbstractByteBuf#ensureAccessible() to try to guard
against using the buffer after it was released (best-effort).
|
| public boolean | isContiguous()
Overrides io. true if this ByteBuf implementation is backed by a single memory region.
|
| public boolean | isDirect()
Implements abstract io. true if and only if this buffer is backed by an
NIO direct buffer.
|
| public boolean | isReadable()
Implements abstract io. true
if and only if (this.writerIndex - this.readerIndex) is greater
than 0.
|
| public boolean | isReadable(int size)
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 size)
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. |
| public int | maxFastWritableBytes()
Overrides io. |
| public int | maxWritableBytes()
Implements abstract io. (this.maxCapacity - this.writerIndex).
|
| public long | memoryAddress()
Implements abstract io. |
| public ByteBuffer | nioBuffer()
Implements abstract io. ByteBuffer.
|
| 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()
Implements abstract io. ByteBuffer's.
|
| 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 | 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(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(byte[] dst)
Implements abstract io. readerIndex and increases the readerIndex
by the number of the transferred bytes (= dst.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(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 ByteBuf | readBytes(OutputStream out, int
the number of bytes to transfer length)Implements abstract io. readerIndex.
|
| 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 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 int | refCnt()
Implements io. |
| public boolean | release()
Implements io. 1 and deallocates this object if the reference count reaches at
0.
|
| public boolean | release(int decrement)
Implements io. decrement and deallocates this object if the reference
count reaches at 0.
|
| 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 | retain()
Implements abstract io. Implements io. 1.
|
| public ByteBuf | retain(int increment)
Implements abstract io. Implements io. increment.
|
| 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, 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 | 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)
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 | 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.
|
| 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.
|
| 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. |
| public ByteBuf | touch()
Implements abstract io. Implements io. |
| public ByteBuf | touch(Object hint)
Implements abstract io. Implements io. |
| public ByteBuf | unwrap()
Implements abstract io. |
| 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(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(byte[] src)
Implements abstract io. writerIndex and increases the writerIndex
by the number of the transferred bytes (= src.length).
|
| 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(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.
|