Package io.netty.buffer
Class PooledDuplicatedByteBuf
java.lang.Object
io.netty.buffer.ByteBuf
io.netty.buffer.AbstractByteBuf
io.netty.buffer.AbstractReferenceCountedByteBuf
io.netty.buffer.AbstractPooledDerivedByteBuf
io.netty.buffer.PooledDuplicatedByteBuf
- All Implemented Interfaces:
ByteBufConvertible
,ReferenceCounted
,Comparable<ByteBuf>
-
Field Summary
FieldsFields inherited from class io.netty.buffer.AbstractByteBuf
checkAccessible, leakDetector, readerIndex, writerIndex
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
-
Method Summary
Modifier and TypeMethodDescriptionprotected byte
_getByte
(int index) protected int
_getInt
(int index) protected int
_getIntLE
(int index) protected long
_getLong
(int index) protected long
_getLongLE
(int index) protected short
_getShort
(int index) protected short
_getShortLE
(int index) protected int
_getUnsignedMedium
(int index) protected int
_getUnsignedMediumLE
(int index) protected void
_setByte
(int index, int value) protected void
_setInt
(int index, int value) protected void
_setIntLE
(int index, int value) protected void
_setLong
(int index, long value) protected void
_setLongLE
(int index, long value) protected void
_setMedium
(int index, int value) protected void
_setMediumLE
(int index, int value) protected void
_setShort
(int index, int value) protected void
_setShortLE
(int index, int value) int
Returns the offset of the first byte within the backing byte array of this buffer.int
capacity()
Returns the number of bytes (octets) this buffer can contain.capacity
(int newCapacity) Adjusts the capacity of this buffer.copy
(int index, int length) Returns a copy of this buffer's sub-region.Returns a buffer which shares the whole region of this buffer.int
forEachByte
(int index, int length, ByteProcessor processor) Iterates over the specified area of this buffer with the specifiedprocessor
in ascending order.int
forEachByteDesc
(int index, int length, ByteProcessor processor) Iterates over the specified area of this buffer with the specifiedprocessor
in descending order.byte
getByte
(int index) Gets a byte at the specified absoluteindex
in this buffer.getBytes
(int index, byte[] dst, int dstIndex, int length) Transfers this buffer's data to the specified destination starting at the specified absoluteindex
.Transfers this buffer's data to the specified destination starting at the specified absoluteindex
.getBytes
(int index, OutputStream out, int length) Transfers this buffer's data to the specified stream starting at the specified absoluteindex
.getBytes
(int index, ByteBuffer dst) Transfers this buffer's data to the specified destination starting at the specified absoluteindex
until the destination's position reaches its limit.int
getBytes
(int index, FileChannel out, long position, int length) Transfers this buffer's data starting at the specified absoluteindex
to the specified channel starting at the given file position.int
getBytes
(int index, GatheringByteChannel out, int length) Transfers this buffer's data to the specified channel starting at the specified absoluteindex
.int
getInt
(int index) Gets a 32-bit integer at the specified absoluteindex
in this buffer.int
getIntLE
(int index) Gets a 32-bit integer at the specified absoluteindex
in this buffer with Little Endian Byte Order.long
getLong
(int index) Gets a 64-bit long integer at the specified absoluteindex
in this buffer.long
getLongLE
(int index) Gets a 64-bit long integer at the specified absoluteindex
in this buffer in Little Endian Byte Order.short
getShort
(int index) Gets a 16-bit short integer at the specified absoluteindex
in this buffer.short
getShortLE
(int index) Gets a 16-bit short integer at the specified absoluteindex
in this buffer in Little Endian Byte Order.int
getUnsignedMedium
(int index) Gets an unsigned 24-bit medium integer at the specified absoluteindex
in this buffer.int
getUnsignedMediumLE
(int index) Gets an unsigned 24-bit medium integer at the specified absoluteindex
in this buffer in Little Endian Byte Order.long
Returns the low-level memory address that point to the first byte of ths backing data.(package private) static PooledDuplicatedByteBuf
newInstance
(AbstractByteBuf unwrapped, ByteBuf wrapped, int readerIndex, int writerIndex) nioBuffer
(int index, int length) Exposes this buffer's sub-region as an NIOByteBuffer
.nioBuffers
(int index, int length) Exposes this buffer's bytes as an NIOByteBuffer
'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.Returns a retained buffer which shares the whole region of this buffer.retainedSlice
(int index, int length) Returns a retained slice of this buffer's sub-region.setByte
(int index, int value) Sets the specified byte at the specified absoluteindex
in this buffer.setBytes
(int index, byte[] src, int srcIndex, int length) Transfers the specified source array's data to this buffer starting at the specified absoluteindex
.Transfers the specified source buffer's data to this buffer starting at the specified absoluteindex
.int
setBytes
(int index, InputStream in, int length) Transfers the content of the specified source stream to this buffer starting at the specified absoluteindex
.setBytes
(int index, ByteBuffer src) Transfers the specified source buffer's data to this buffer starting at the specified absoluteindex
until the source buffer's position reaches its limit.int
setBytes
(int index, FileChannel in, long position, int length) Transfers the content of the specified source channel starting at the given file position to this buffer starting at the specified absoluteindex
.int
setBytes
(int index, ScatteringByteChannel in, int length) Transfers the content of the specified source channel to this buffer starting at the specified absoluteindex
.setInt
(int index, int value) Sets the specified 32-bit integer at the specified absoluteindex
in this buffer.setIntLE
(int index, int value) Sets the specified 32-bit integer at the specified absoluteindex
in this buffer with Little Endian byte order .setLong
(int index, long value) Sets the specified 64-bit long integer at the specified absoluteindex
in this buffer.setLongLE
(int index, long value) Sets the specified 64-bit long integer at the specified absoluteindex
in this buffer in Little Endian Byte Order.setMedium
(int index, int value) Sets the specified 24-bit medium integer at the specified absoluteindex
in this buffer.setMediumLE
(int index, int value) Sets the specified 24-bit medium integer at the specified absoluteindex
in this buffer in the Little Endian Byte Order.setShort
(int index, int value) Sets the specified 16-bit short integer at the specified absoluteindex
in this buffer.setShortLE
(int index, int value) Sets the specified 16-bit short integer at the specified absoluteindex
in this buffer with the Little Endian Byte Order.Methods inherited from class io.netty.buffer.AbstractPooledDerivedByteBuf
alloc, array, deallocate, duplicate0, hasArray, hasMemoryAddress, init, internalNioBuffer, isContiguous, isDirect, isReadOnly, nioBufferCount, order, parent, retainedSlice, slice, unwrap
Methods inherited from class io.netty.buffer.AbstractReferenceCountedByteBuf
isAccessible, refCnt, release, release, resetRefCnt, retain, retain, setRefCnt, touch, touch
Methods inherited from class io.netty.buffer.AbstractByteBuf
adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkIndex0, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardMarks, discardReadBytes, discardSomeReadBytes, ensureAccessible, ensureWritable, ensureWritable, ensureWritable0, equals, forEachByte, forEachByteAsc0, forEachByteDesc, forEachByteDesc0, getBoolean, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getMedium, getMediumLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedShort, getUnsignedShortLE, hashCode, indexOf, isReadable, isReadable, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, newSwappedByteBuf, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readCharSequence, readDouble, readerIndex, readerIndex, readFloat, readInt, readIntLE, readLong, readLongLE, readMedium, readMediumLE, readRetainedSlice, readShort, readShortLE, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, resetReaderIndex, resetWriterIndex, setBoolean, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setIndex0, setZero, skipBytes, slice, toString, toString, toString, trimIndicesToCapacity, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeCharSequence, writeDouble, writeFloat, writeInt, writeIntLE, writeLong, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShort, writeShortLE, writeZero
Methods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, maxFastWritableBytes, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
Field Details
-
RECYCLER
-
-
Constructor Details
-
PooledDuplicatedByteBuf
-
-
Method Details
-
newInstance
static PooledDuplicatedByteBuf newInstance(AbstractByteBuf unwrapped, ByteBuf wrapped, int readerIndex, int writerIndex) -
capacity
public int capacity()Description copied from class:ByteBuf
Returns the number of bytes (octets) this buffer can contain. -
capacity
Description copied from class:ByteBuf
Adjusts the capacity of this buffer. If thenewCapacity
is less than the current capacity, the content of this buffer is truncated. If thenewCapacity
is greater than the current capacity, the buffer is appended with unspecified data whose length is(newCapacity - currentCapacity)
. -
arrayOffset
public int arrayOffset()Description copied from class:ByteBuf
Returns the offset of the first byte within the backing byte array of this buffer.- Specified by:
arrayOffset
in classByteBuf
-
memoryAddress
public long memoryAddress()Description copied from class:ByteBuf
Returns the low-level memory address that point to the first byte of ths backing data.- Specified by:
memoryAddress
in classByteBuf
-
nioBuffer
Description copied from class:ByteBuf
Exposes this buffer's sub-region as an NIOByteBuffer
. 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. This method does not modifyreaderIndex
orwriterIndex
of this buffer. Please note that the returned NIO buffer will not see the changes of this buffer if this buffer is a dynamic buffer and it adjusted its capacity. -
nioBuffers
Description copied from class:ByteBuf
Exposes this buffer's bytes as an NIOByteBuffer
'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. This method does not modifyreaderIndex
orwriterIndex
of this buffer. Please note that the returned NIO buffer will not see the changes of this buffer if this buffer is a dynamic buffer and it adjusted its capacity.- Specified by:
nioBuffers
in classByteBuf
- See Also:
-
copy
Description copied from class:ByteBuf
Returns a copy of this buffer's sub-region. Modifying the content of the returned buffer or this buffer does not affect each other at all. This method does not modifyreaderIndex
orwriterIndex
of this buffer. -
retainedSlice
Description copied from class:ByteBuf
Returns a retained slice of this buffer's sub-region. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndex
orwriterIndex
of this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(int, int)
. This method behaves similarly toslice(...).retain()
except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedSlice
in classAbstractByteBuf
-
duplicate
Description copied from class:ByteBuf
Returns a buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method does not modifyreaderIndex
orwriterIndex
of this buffer.The reader and writer marks will not be duplicated. Also be aware that this method will NOT call
ByteBuf.retain()
and so the reference count will NOT be increased.- Overrides:
duplicate
in classAbstractByteBuf
- Returns:
- A buffer whose readable content is equivalent to the buffer returned by
ByteBuf.slice()
. However this buffer will share the capacity of the underlying buffer, and therefore allows access to all of the underlying content if necessary.
-
retainedDuplicate
Description copied from class:ByteBuf
Returns a retained buffer which shares the whole region of this buffer. Modifying the content of the returned buffer or this buffer affects each other's content while they maintain separate indexes and marks. This method is identical tobuf.slice(0, buf.capacity())
. This method does not modifyreaderIndex
orwriterIndex
of this buffer.Note that this method returns a retained buffer unlike
ByteBuf.slice(int, int)
. This method behaves similarly toduplicate().retain()
except that this method may return a buffer implementation that produces less garbage.- Overrides:
retainedDuplicate
in classAbstractByteBuf
-
getByte
public byte getByte(int index) Description copied from class:ByteBuf
Gets a byte at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getByte
in classAbstractByteBuf
-
_getByte
protected byte _getByte(int index) - Specified by:
_getByte
in classAbstractByteBuf
-
getShort
public short getShort(int index) Description copied from class:ByteBuf
Gets a 16-bit short integer at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getShort
in classAbstractByteBuf
-
_getShort
protected short _getShort(int index) - Specified by:
_getShort
in classAbstractByteBuf
-
getShortLE
public short getShortLE(int index) Description copied from class:ByteBuf
Gets a 16-bit short integer at the specified absoluteindex
in this buffer in Little Endian Byte Order. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getShortLE
in classAbstractByteBuf
-
_getShortLE
protected short _getShortLE(int index) - Specified by:
_getShortLE
in classAbstractByteBuf
-
getUnsignedMedium
public int getUnsignedMedium(int index) Description copied from class:ByteBuf
Gets an unsigned 24-bit medium integer at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getUnsignedMedium
in classAbstractByteBuf
-
_getUnsignedMedium
protected int _getUnsignedMedium(int index) - Specified by:
_getUnsignedMedium
in classAbstractByteBuf
-
getUnsignedMediumLE
public int getUnsignedMediumLE(int index) Description copied from class:ByteBuf
Gets an unsigned 24-bit medium integer at the specified absoluteindex
in this buffer in Little Endian Byte Order. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getUnsignedMediumLE
in classAbstractByteBuf
-
_getUnsignedMediumLE
protected int _getUnsignedMediumLE(int index) - Specified by:
_getUnsignedMediumLE
in classAbstractByteBuf
-
getInt
public int getInt(int index) Description copied from class:ByteBuf
Gets a 32-bit integer at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getInt
in classAbstractByteBuf
-
_getInt
protected int _getInt(int index) - Specified by:
_getInt
in classAbstractByteBuf
-
getIntLE
public int getIntLE(int index) Description copied from class:ByteBuf
Gets a 32-bit integer at the specified absoluteindex
in this buffer with Little Endian Byte Order. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getIntLE
in classAbstractByteBuf
-
_getIntLE
protected int _getIntLE(int index) - Specified by:
_getIntLE
in classAbstractByteBuf
-
getLong
public long getLong(int index) Description copied from class:ByteBuf
Gets a 64-bit long integer at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getLong
in classAbstractByteBuf
-
_getLong
protected long _getLong(int index) - Specified by:
_getLong
in classAbstractByteBuf
-
getLongLE
public long getLongLE(int index) Description copied from class:ByteBuf
Gets a 64-bit long integer at the specified absoluteindex
in this buffer in Little Endian Byte Order. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
getLongLE
in classAbstractByteBuf
-
_getLongLE
protected long _getLongLE(int index) - Specified by:
_getLongLE
in classAbstractByteBuf
-
getBytes
Description copied from class:ByteBuf
Transfers this buffer's data to the specified destination starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of both the source (i.e.this
) and the destination. -
getBytes
Description copied from class:ByteBuf
Transfers this buffer's data to the specified destination starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer. -
getBytes
Description copied from class:ByteBuf
Transfers this buffer's data to the specified destination starting at the specified absoluteindex
until the destination's position reaches its limit. This method does not modifyreaderIndex
orwriterIndex
of this buffer while the destination'sposition
will be increased. -
setByte
Description copied from class:ByteBuf
Sets the specified byte at the specified absoluteindex
in this buffer. The 24 high-order bits of the specified value are ignored. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setByte
in classAbstractByteBuf
-
_setByte
protected void _setByte(int index, int value) - Specified by:
_setByte
in classAbstractByteBuf
-
setShort
Description copied from class:ByteBuf
Sets the specified 16-bit short integer at the specified absoluteindex
in this buffer. The 16 high-order bits of the specified value are ignored. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setShort
in classAbstractByteBuf
-
_setShort
protected void _setShort(int index, int value) - Specified by:
_setShort
in classAbstractByteBuf
-
setShortLE
Description copied from class:ByteBuf
Sets the specified 16-bit short integer at the specified absoluteindex
in this buffer with the Little Endian Byte Order. The 16 high-order bits of the specified value are ignored. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setShortLE
in classAbstractByteBuf
-
_setShortLE
protected void _setShortLE(int index, int value) - Specified by:
_setShortLE
in classAbstractByteBuf
-
setMedium
Description copied from class:ByteBuf
Sets the specified 24-bit medium integer at the specified absoluteindex
in this buffer. Please note that the most significant byte is ignored in the specified value. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setMedium
in classAbstractByteBuf
-
_setMedium
protected void _setMedium(int index, int value) - Specified by:
_setMedium
in classAbstractByteBuf
-
setMediumLE
Description copied from class:ByteBuf
Sets the specified 24-bit medium integer at the specified absoluteindex
in this buffer in the Little Endian Byte Order. Please note that the most significant byte is ignored in the specified value. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setMediumLE
in classAbstractByteBuf
-
_setMediumLE
protected void _setMediumLE(int index, int value) - Specified by:
_setMediumLE
in classAbstractByteBuf
-
setInt
Description copied from class:ByteBuf
Sets the specified 32-bit integer at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setInt
in classAbstractByteBuf
-
_setInt
protected void _setInt(int index, int value) - Specified by:
_setInt
in classAbstractByteBuf
-
setIntLE
Description copied from class:ByteBuf
Sets the specified 32-bit integer at the specified absoluteindex
in this buffer with Little Endian byte order . This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setIntLE
in classAbstractByteBuf
-
_setIntLE
protected void _setIntLE(int index, int value) - Specified by:
_setIntLE
in classAbstractByteBuf
-
setLong
Description copied from class:ByteBuf
Sets the specified 64-bit long integer at the specified absoluteindex
in this buffer. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setLong
in classAbstractByteBuf
-
_setLong
protected void _setLong(int index, long value) - Specified by:
_setLong
in classAbstractByteBuf
-
setLongLE
Description copied from class:ByteBuf
Sets the specified 64-bit long integer at the specified absoluteindex
in this buffer in Little Endian Byte Order. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Overrides:
setLongLE
in classAbstractByteBuf
-
_setLongLE
protected void _setLongLE(int index, long value) - Specified by:
_setLongLE
in classAbstractByteBuf
-
setBytes
Description copied from class:ByteBuf
Transfers the specified source array's data to this buffer starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer. -
setBytes
Description copied from class:ByteBuf
Transfers the specified source buffer's data to this buffer starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of both the source (i.e.this
) and the destination. -
setBytes
Description copied from class:ByteBuf
Transfers the specified source buffer's data to this buffer starting at the specified absoluteindex
until the source buffer's position reaches its limit. This method does not modifyreaderIndex
orwriterIndex
of this buffer. -
getBytes
Description copied from class:ByteBuf
Transfers this buffer's data to the specified stream starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Specified by:
getBytes
in classByteBuf
- Parameters:
length
- the number of bytes to transfer- Throws:
IOException
- if the specified stream threw an exception during I/O
-
getBytes
Description copied from class:ByteBuf
Transfers this buffer's data to the specified channel starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Specified by:
getBytes
in classByteBuf
- Parameters:
length
- the maximum number of bytes to transfer- Returns:
- the actual number of bytes written out to the specified channel
- Throws:
IOException
- if the specified channel threw an exception during I/O
-
getBytes
Description copied from class:ByteBuf
Transfers this buffer's data starting at the specified absoluteindex
to the specified channel starting at the given file position. This method does not modifyreaderIndex
orwriterIndex
of this buffer. This method does not modify the channel's position.- Specified by:
getBytes
in classByteBuf
- Parameters:
position
- the file position at which the transfer is to beginlength
- the maximum number of bytes to transfer- Returns:
- the actual number of bytes written out to the specified channel
- Throws:
IOException
- if the specified channel threw an exception during I/O
-
setBytes
Description copied from class:ByteBuf
Transfers the content of the specified source stream to this buffer starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Specified by:
setBytes
in classByteBuf
- Parameters:
length
- the number of bytes to transfer- Returns:
- the actual number of bytes read in from the specified channel.
-1
if the specifiedInputStream
reached EOF. - Throws:
IOException
- if the specified stream threw an exception during I/O
-
setBytes
Description copied from class:ByteBuf
Transfers the content of the specified source channel to this buffer starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer.- Specified by:
setBytes
in classByteBuf
- Parameters:
length
- the maximum number of bytes to transfer- Returns:
- the actual number of bytes read in from the specified channel.
-1
if the specified channel is closed or it reached EOF. - Throws:
IOException
- if the specified channel threw an exception during I/O
-
setBytes
Description copied from class:ByteBuf
Transfers the content of the specified source channel starting at the given file position to this buffer starting at the specified absoluteindex
. This method does not modifyreaderIndex
orwriterIndex
of this buffer. This method does not modify the channel's position.- Specified by:
setBytes
in classByteBuf
- Parameters:
position
- the file position at which the transfer is to beginlength
- the maximum number of bytes to transfer- Returns:
- the actual number of bytes read in from the specified channel.
-1
if the specified channel is closed or it reached EOF. - Throws:
IOException
- if the specified channel threw an exception during I/O
-
forEachByte
Description copied from class:ByteBuf
Iterates over the specified area of this buffer with the specifiedprocessor
in ascending order. (i.e.index
,(index + 1)
, ..(index + length - 1)
)- Overrides:
forEachByte
in classAbstractByteBuf
- Returns:
-1
if the processor iterated to or beyond the end of the specified area. The last-visited index If theByteProcessor.process(byte)
returnedfalse
.
-
forEachByteDesc
Description copied from class:ByteBuf
Iterates over the specified area of this buffer with the specifiedprocessor
in descending order. (i.e.(index + length - 1)
,(index + length - 2)
, ...index
)- Overrides:
forEachByteDesc
in classAbstractByteBuf
- Returns:
-1
if the processor iterated to or beyond the beginning of the specified area. The last-visited index If theByteProcessor.process(byte)
returnedfalse
.
-