Class AbstractDerivedByteBuf

All Implemented Interfaces:
ByteBufConvertible, ReferenceCounted, Comparable<ByteBuf>
Direct Known Subclasses:
DuplicatedByteBuf, ReadOnlyByteBuf, SlicedByteBuf

@Deprecated public abstract class AbstractDerivedByteBuf extends AbstractByteBuf
Deprecated.
Do not use.
Abstract base class for ByteBuf implementations that wrap another ByteBuf.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    AbstractDerivedByteBuf(int maxCapacity)
    Deprecated.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    internalNioBuffer(int index, int length)
    Deprecated.
    Internal use only: Exposes the internal NIO buffer.
    boolean
    Deprecated.
    Returns true if this ByteBuf implementation is backed by a single memory region.
    boolean
    Deprecated.
    Returns true if and only if this buffer is read-only.
    nioBuffer(int index, int length)
    Deprecated.
    Exposes this buffer's sub-region as an NIO ByteBuffer.
    final int
    Deprecated.
    Returns the reference count of this object.
    final boolean
    Deprecated.
    Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
    final boolean
    release(int decrement)
    Deprecated.
    Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
    final ByteBuf
    Deprecated.
    Increases the reference count by 1.
    final ByteBuf
    retain(int increment)
    Deprecated.
    Increases the reference count by the specified increment.
    final ByteBuf
    Deprecated.
    Records the current access location of this object for debugging purposes.
    final ByteBuf
    touch(Object hint)
    Deprecated.
    Records the current access location of this object with an additional arbitrary information for debugging purposes.

    Methods inherited from class AbstractByteBuf

    _getByte, _getInt, _getIntLE, _getLong, _getLongLE, _getShort, _getShortLE, _getUnsignedMedium, _getUnsignedMediumLE, _setByte, _setInt, _setIntLE, _setLong, _setLongLE, _setMedium, _setMediumLE, _setShort, _setShortLE, adjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkDstIndex, checkIndex, checkIndex, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getByte, getBytes, getBytes, getBytes, getChar, getCharSequence, getDouble, getFloat, getInt, getIntLE, getLong, getLongLE, getMedium, getMediumLE, getShort, getShortLE, getUnsignedByte, getUnsignedInt, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, 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, readString, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, resetReaderIndex, resetWriterIndex, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setByte, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, setZero, skipBytes, slice, 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
    Modifier and Type
    Method
    Description
    protected abstract byte
    _getByte(int index)
     
    protected abstract int
    _getInt(int index)
     
    protected abstract int
    _getIntLE(int index)
     
    protected abstract long
    _getLong(int index)
     
    protected abstract long
    _getLongLE(int index)
     
    protected abstract short
    _getShort(int index)
     
    protected abstract short
    _getShortLE(int index)
     
    protected abstract int
    _getUnsignedMedium(int index)
     
    protected abstract int
     
    protected abstract void
    _setByte(int index, int value)
     
    protected abstract void
    _setInt(int index, int value)
     
    protected abstract void
    _setIntLE(int index, int value)
     
    protected abstract void
    _setLong(int index, long value)
     
    protected abstract void
    _setLongLE(int index, long value)
     
    protected abstract void
    _setMedium(int index, int value)
     
    protected abstract void
    _setMediumLE(int index, int value)
     
    protected abstract void
    _setShort(int index, int value)
     
    protected abstract void
    _setShortLE(int index, int value)
     
    protected final void
    adjustMarkers(int decrement)
     
    Returns a read-only version of this buffer.
    int
    bytesBefore(byte value)
    Locates the first occurrence of the specified value in this buffer.
    int
    bytesBefore(int length, byte value)
    Locates the first occurrence of the specified value in this buffer.
    int
    bytesBefore(int index, int length, byte value)
    Locates the first occurrence of the specified value in this buffer.
    protected final void
    checkDstIndex(int length, int dstIndex, int dstCapacity)
     
    protected final void
    checkDstIndex(int index, int length, int dstIndex, int dstCapacity)
     
    protected final void
    checkIndex(int index)
     
    protected final void
    checkIndex(int index, int fieldLength)
     
    protected final void
    checkNewCapacity(int newCapacity)
     
    protected final void
    checkReadableBytes(int minimumReadableBytes)
    Throws an IndexOutOfBoundsException if the current readable bytes of this buffer is less than the specified value.
    protected final void
    checkSrcIndex(int index, int length, int srcIndex, int srcCapacity)
     
    Sets the readerIndex and writerIndex of this buffer to 0.
    int
    Compares the content of the specified buffer to the content of this buffer.
    Returns a copy of this buffer's readable bytes.
    Discards the bytes between the 0th index and readerIndex.
    Similar to 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.
    Returns a buffer which shares the whole region of this buffer.
    protected final void
    Should be called by every method that tries to access the buffers content to check if the buffer was released before.
    ensureWritable(int minWritableBytes)
    Expands the buffer ByteBuf.capacity() to make sure the number of writable bytes is equal to or greater than the specified value.
    int
    ensureWritable(int minWritableBytes, boolean force)
    Expands the buffer ByteBuf.capacity() to make sure the number of writable bytes is equal to or greater than the specified value.
    boolean
    Determines if the content of the specified buffer is identical to the content of this array.
    int
    forEachByte(int index, int length, ByteProcessor processor)
    Iterates over the specified area of this buffer with the specified processor in ascending order.
    int
    Iterates over the readable bytes of this buffer with the specified processor in ascending order.
    int
    forEachByteDesc(int index, int length, ByteProcessor processor)
    Iterates over the specified area of this buffer with the specified processor in descending order.
    int
    Iterates over the readable bytes of this buffer with the specified processor in descending order.
    boolean
    getBoolean(int index)
    Gets a boolean at the specified absolute (@code index) in this buffer.
    byte
    getByte(int index)
    Gets a byte at the specified absolute index in this buffer.
    getBytes(int index, byte[] dst)
    Transfers this buffer's data to the specified destination starting at the specified absolute index.
    getBytes(int index, ByteBuf dst)
    Transfers this buffer's data to the specified destination starting at the specified absolute index until the destination becomes non-writable.
    getBytes(int index, ByteBuf dst, int length)
    Transfers this buffer's data to the specified destination starting at the specified absolute index.
    char
    getChar(int index)
    Gets a 2-byte UTF-16 character at the specified absolute index in this buffer.
    getCharSequence(int index, int length, Charset charset)
    Gets a CharSequence with the given length at the given index.
    double
    getDouble(int index)
    Gets a 64-bit floating point number at the specified absolute index in this buffer.
    float
    getFloat(int index)
    Gets a 32-bit floating point number at the specified absolute index in this buffer.
    int
    getInt(int index)
    Gets a 32-bit integer at the specified absolute index in this buffer.
    int
    getIntLE(int index)
    Gets a 32-bit integer at the specified absolute index in this buffer with Little Endian Byte Order.
    long
    getLong(int index)
    Gets a 64-bit long integer at the specified absolute index in this buffer.
    long
    getLongLE(int index)
    Gets a 64-bit long integer at the specified absolute index in this buffer in Little Endian Byte Order.
    int
    getMedium(int index)
    Gets a 24-bit medium integer at the specified absolute index in this buffer.
    int
    getMediumLE(int index)
    Gets a 24-bit medium integer at the specified absolute index in this buffer in the Little Endian Byte Order.
    short
    getShort(int index)
    Gets a 16-bit short integer at the specified absolute index in this buffer.
    short
    getShortLE(int index)
    Gets a 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.
    short
    getUnsignedByte(int index)
    Gets an unsigned byte at the specified absolute index in this buffer.
    long
    getUnsignedInt(int index)
    Gets an unsigned 32-bit integer at the specified absolute index in this buffer.
    long
    getUnsignedIntLE(int index)
    Gets an unsigned 32-bit integer at the specified absolute index in this buffer in Little Endian Byte Order.
    int
    getUnsignedMedium(int index)
    Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer.
    int
    Gets an unsigned 24-bit medium integer at the specified absolute index in this buffer in Little Endian Byte Order.
    int
    getUnsignedShort(int index)
    Gets an unsigned 16-bit short integer at the specified absolute index in this buffer.
    int
    getUnsignedShortLE(int index)
    Gets an unsigned 16-bit short integer at the specified absolute index in this buffer in Little Endian Byte Order.
    int
    Returns a hash code which was calculated from the content of this buffer.
    int
    indexOf(int fromIndex, int toIndex, byte value)
    Locates the first occurrence of the specified value in this buffer.
    boolean
    Returns true if and only if (this.writerIndex - this.readerIndex) is greater than 0.
    boolean
    isReadable(int numBytes)
    Returns true if and only if this buffer contains equal to or more than the specified number of elements.
    boolean
    Returns true if and only if (this.capacity - this.writerIndex) is greater than 0.
    boolean
    isWritable(int numBytes)
    Returns true if and only if this buffer has enough room to allow writing the specified number of elements.
    Marks the current readerIndex in this buffer.
    Marks the current writerIndex in this buffer.
    int
    Returns the maximum allowed capacity of this buffer.
    protected final void
    maxCapacity(int maxCapacity)
     
    int
    Returns the maximum possible number of writable bytes, which is equal to (this.maxCapacity - this.writerIndex).
    protected SwappedByteBuf
    Creates a new SwappedByteBuf for this ByteBuf instance.
    Exposes this buffer's readable bytes as an NIO ByteBuffer.
    Exposes this buffer's readable bytes as an NIO ByteBuffer's.
    order(ByteOrder endianness)
    Returns a buffer with the specified endianness which shares the whole region, indexes, and marks of this buffer.
    int
    Returns the number of readable bytes which is equal to (this.writerIndex - this.readerIndex).
    boolean
    Gets a boolean at the current readerIndex and increases the readerIndex by 1 in this buffer.
    byte
    Gets a byte at the current readerIndex and increases the readerIndex by 1 in this buffer.
    readBytes(byte[] dst)
    Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= dst.length).
    readBytes(byte[] dst, int dstIndex, int length)
    Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
    readBytes(int length)
    Transfers this buffer's data to a newly created buffer starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
    Transfers this buffer's data to the specified destination starting at the current readerIndex until the destination becomes non-writable, and increases the readerIndex by the number of the transferred bytes.
    readBytes(ByteBuf dst, int length)
    Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
    readBytes(ByteBuf dst, int dstIndex, int length)
    Transfers this buffer's data to the specified destination starting at the current readerIndex and increases the readerIndex by the number of the transferred bytes (= length).
    readBytes(OutputStream out, int length)
    Transfers this buffer's data to the specified stream starting at the current readerIndex.
    Transfers this buffer's data to the specified destination starting at the current readerIndex until the destination's position reaches its limit, and increases the readerIndex by the number of the transferred bytes.
    int
    readBytes(FileChannel out, long position, int length)
    Transfers this buffer's data starting at the current readerIndex to the specified channel starting at the given file position.
    int
    readBytes(GatheringByteChannel out, int length)
    Transfers this buffer's data to the specified stream starting at the current readerIndex.
    char
    Gets a 2-byte UTF-16 character at the current readerIndex and increases the readerIndex by 2 in this buffer.
    readCharSequence(int length, Charset charset)
    Gets a CharSequence with the given length at the current readerIndex and increases the readerIndex by the given length.
    double
    Gets a 64-bit floating point number at the current readerIndex and increases the readerIndex by 8 in this buffer.
    int
    Returns the readerIndex of this buffer.
    readerIndex(int readerIndex)
    Sets the readerIndex of this buffer.
    float
    Gets a 32-bit floating point number at the current readerIndex and increases the readerIndex by 4 in this buffer.
    int
    Gets a 32-bit integer at the current readerIndex and increases the readerIndex by 4 in this buffer.
    int
    Gets a 32-bit integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 4 in this buffer.
    long
    Gets a 64-bit integer at the current readerIndex and increases the readerIndex by 8 in this buffer.
    long
    Gets a 64-bit integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 8 in this buffer.
    int
    Gets a 24-bit medium integer at the current readerIndex and increases the readerIndex by 3 in this buffer.
    int
    Gets a 24-bit medium integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 3 in this buffer.
    readRetainedSlice(int length)
    Returns a new retained slice of this buffer's sub-region starting at the current readerIndex and increases the readerIndex by the size of the new slice (= length).
    short
    Gets a 16-bit short integer at the current readerIndex and increases the readerIndex by 2 in this buffer.
    short
    Gets a 16-bit short integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 2 in this buffer.
    readSlice(int length)
    Returns a new slice of this buffer's sub-region starting at the current readerIndex and increases the readerIndex by the size of the new slice (= length).
    readString(int length, Charset charset)
    Gets a String with the given length at the current readerIndex and increases the readerIndex by the given length.
    short
    Gets an unsigned byte at the current readerIndex and increases the readerIndex by 1 in this buffer.
    long
    Gets an unsigned 32-bit integer at the current readerIndex and increases the readerIndex by 4 in this buffer.
    long
    Gets an unsigned 32-bit integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 4 in this buffer.
    int
    Gets an unsigned 24-bit medium integer at the current readerIndex and increases the readerIndex by 3 in this buffer.
    int
    Gets an unsigned 24-bit medium integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 3 in this buffer.
    int
    Gets an unsigned 16-bit short integer at the current readerIndex and increases the readerIndex by 2 in this buffer.
    int
    Gets an unsigned 16-bit short integer at the current readerIndex in the Little Endian Byte Order and increases the readerIndex by 2 in this buffer.
    Repositions the current readerIndex to the marked readerIndex in this buffer.
    Repositions the current writerIndex to the marked writerIndex in this buffer.
    Returns a retained buffer which shares the whole region of this buffer.
    Returns a retained slice of this buffer's readable bytes.
    retainedSlice(int index, int length)
    Returns a retained slice of this buffer's sub-region.
    setBoolean(int index, boolean value)
    Sets the specified boolean at the specified absolute index in this buffer.
    setByte(int index, int value)
    Sets the specified byte at the specified absolute index in this buffer.
    setBytes(int index, byte[] src)
    Transfers the specified source array's data to this buffer starting at the specified absolute index.
    setBytes(int index, ByteBuf src)
    Transfers the specified source buffer's data to this buffer starting at the specified absolute index until the source buffer becomes unreadable.
    setBytes(int index, ByteBuf src, int length)
    Transfers the specified source buffer's data to this buffer starting at the specified absolute index.
    setChar(int index, int value)
    Sets the specified 2-byte UTF-16 character at the specified absolute index in this buffer.
    int
    setCharSequence(int index, CharSequence sequence, Charset charset)
    Writes the specified CharSequence at the given index.
    setDouble(int index, double value)
    Sets the specified 64-bit floating-point number at the specified absolute index in this buffer.
    setFloat(int index, float value)
    Sets the specified 32-bit floating-point number at the specified absolute index in this buffer.
    setIndex(int readerIndex, int writerIndex)
    Sets the readerIndex and writerIndex of this buffer in one shot.
    setInt(int index, int value)
    Sets the specified 32-bit integer at the specified absolute index in this buffer.
    setIntLE(int index, int value)
    Sets the specified 32-bit integer at the specified absolute index in this buffer with Little Endian byte order .
    setLong(int index, long value)
    Sets the specified 64-bit long integer at the specified absolute index in this buffer.
    setLongLE(int index, long value)
    Sets the specified 64-bit long integer at the specified absolute index in this buffer in Little Endian Byte Order.
    setMedium(int index, int value)
    Sets the specified 24-bit medium integer at the specified absolute index in this buffer.
    setMediumLE(int index, int value)
    Sets the specified 24-bit medium integer at the specified absolute index in this buffer in the Little Endian Byte Order.
    setShort(int index, int value)
    Sets the specified 16-bit short integer at the specified absolute index in this buffer.
    setShortLE(int index, int value)
    Sets the specified 16-bit short integer at the specified absolute index in this buffer with the Little Endian Byte Order.
    setZero(int index, int length)
    Fills this buffer with NUL (0x00) starting at the specified absolute index.
    skipBytes(int length)
    Increases the current readerIndex by the specified length in this buffer.
    Returns a slice of this buffer's readable bytes.
    slice(int index, int length)
    Returns a slice of this buffer's sub-region.
    Returns the string representation of this buffer.
    toString(int index, int length, Charset charset)
    Decodes this buffer's sub-region into a string with the specified character set.
    toString(Charset charset)
    Decodes this buffer's readable bytes into a string with the specified character set name.
    protected final void
    trimIndicesToCapacity(int newCapacity)
     
    int
    Returns the number of writable bytes which is equal to (this.capacity - this.writerIndex).
    writeBoolean(boolean value)
    Sets the specified boolean at the current writerIndex and increases the writerIndex by 1 in this buffer.
    writeByte(int value)
    Sets the specified byte at the current writerIndex and increases the writerIndex by 1 in this buffer.
    writeBytes(byte[] src)
    Transfers the specified source array's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= src.length).
    writeBytes(byte[] src, int srcIndex, int length)
    Transfers the specified source array's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= length).
    Transfers the specified source buffer's data to this buffer starting at the current writerIndex until the source buffer becomes unreadable, and increases the writerIndex by the number of the transferred bytes.
    writeBytes(ByteBuf src, int length)
    Transfers the specified source buffer's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= length).
    writeBytes(ByteBuf src, int srcIndex, int length)
    Transfers the specified source buffer's data to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes (= length).
    int
    writeBytes(InputStream in, int length)
    Transfers the content of the specified stream to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes.
    Transfers the specified source buffer's data to this buffer starting at the current writerIndex until the source buffer's position reaches its limit, and increases the writerIndex by the number of the transferred bytes.
    int
    writeBytes(FileChannel in, long position, int length)
    Transfers the content of the specified channel starting at the given file position to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes.
    int
    Transfers the content of the specified channel to this buffer starting at the current writerIndex and increases the writerIndex by the number of the transferred bytes.
    writeChar(int value)
    Sets the specified 2-byte UTF-16 character at the current writerIndex and increases the writerIndex by 2 in this buffer.
    int
    Writes the specified CharSequence at the current writerIndex and increases the writerIndex by the written bytes.
    writeDouble(double value)
    Sets the specified 64-bit floating point number at the current writerIndex and increases the writerIndex by 8 in this buffer.
    writeFloat(float value)
    Sets the specified 32-bit floating point number at the current writerIndex and increases the writerIndex by 4 in this buffer.
    writeInt(int value)
    Sets the specified 32-bit integer at the current writerIndex and increases the writerIndex by 4 in this buffer.
    writeIntLE(int value)
    Sets the specified 32-bit integer at the current writerIndex in the Little Endian Byte Order and increases the writerIndex by 4 in this buffer.
    writeLong(long value)
    Sets the specified 64-bit long integer at the current writerIndex and increases the writerIndex by 8 in this buffer.
    writeLongLE(long value)
    Sets the specified 64-bit long integer at the current writerIndex in the Little Endian Byte Order and increases the writerIndex by 8 in this buffer.
    writeMedium(int value)
    Sets the specified 24-bit medium integer at the current writerIndex and increases the writerIndex by 3 in this buffer.
    writeMediumLE(int value)
    Sets the specified 24-bit medium integer at the current writerIndex in the Little Endian Byte Order and increases the writerIndex by 3 in this buffer.
    int
    Returns the writerIndex of this buffer.
    writerIndex(int writerIndex)
    Sets the writerIndex of this buffer.
    writeShort(int value)
    Sets the specified 16-bit short integer at the current writerIndex and increases the writerIndex by 2 in this buffer.
    writeShortLE(int value)
    Sets the specified 16-bit short integer in the Little Endian Byte Order at the current writerIndex and increases the writerIndex by 2 in this buffer.
    writeZero(int length)
    Fills this buffer with NUL (0x00) starting at the current writerIndex and increases the writerIndex by the specified length.

    Methods inherited from class ByteBuf

    alloc, array, arrayOffset, asByteBuf, capacity, capacity, copy, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getDoubleLE, getFloatLE, hasArray, hasMemoryAddress, isDirect, maxFastWritableBytes, memoryAddress, nioBufferCount, nioBuffers, order, readDoubleLE, readFloatLE, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setDoubleLE, setFloatLE, unwrap, writeDoubleLE, writeFloatLE
    Modifier and Type
    Method
    Description
    Returns the ByteBufAllocator which created this buffer.
    abstract byte[]
    Returns the backing byte array of this buffer.
    abstract int
    Returns the offset of the first byte within the backing byte array of this buffer.
    A ByteBuf can turn into itself.
    abstract int
    Returns the number of bytes (octets) this buffer can contain.
    abstract ByteBuf
    capacity(int newCapacity)
    Adjusts the capacity of this buffer.
    abstract ByteBuf
    copy(int index, int length)
    Returns a copy of this buffer's sub-region.
    abstract ByteBuf
    getBytes(int index, byte[] dst, int dstIndex, int length)
    Transfers this buffer's data to the specified destination starting at the specified absolute index.
    abstract ByteBuf
    getBytes(int index, ByteBuf dst, int dstIndex, int length)
    Transfers this buffer's data to the specified destination starting at the specified absolute index.
    abstract ByteBuf
    getBytes(int index, OutputStream out, int length)
    Transfers this buffer's data to the specified stream starting at the specified absolute index.
    abstract ByteBuf
    getBytes(int index, ByteBuffer dst)
    Transfers this buffer's data to the specified destination starting at the specified absolute index until the destination's position reaches its limit.
    abstract int
    getBytes(int index, FileChannel out, long position, int length)
    Transfers this buffer's data starting at the specified absolute index to the specified channel starting at the given file position.
    abstract int
    getBytes(int index, GatheringByteChannel out, int length)
    Transfers this buffer's data to the specified channel starting at the specified absolute index.
    double
    getDoubleLE(int index)
    Gets a 64-bit floating point number at the specified absolute index in this buffer in Little Endian Byte Order.
    float
    getFloatLE(int index)
    Gets a 32-bit floating point number at the specified absolute index in this buffer in Little Endian Byte Order.
    abstract boolean
    Returns true if and only if this buffer has a backing byte array.
    abstract boolean
    Returns true if and only if this buffer has a reference to the low-level memory address that points to the backing data.
    abstract boolean
    Returns true if and only if this buffer is backed by an NIO direct buffer.
    int
    Returns the maximum number of bytes which can be written for certain without involving an internal reallocation or data-copy.
    abstract long
    Returns the low-level memory address that point to the first byte of ths backing data.
    abstract int
    Returns the maximum number of NIO ByteBuffers that consist this buffer.
    abstract ByteBuffer[]
    nioBuffers(int index, int length)
    Exposes this buffer's bytes as an NIO 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.
    abstract ByteOrder
    Deprecated.
    use the Little Endian accessors, e.g.
    double
    Gets a 64-bit floating point number at the current readerIndex in Little Endian Byte Order and increases the readerIndex by 8 in this buffer.
    float
    Gets a 32-bit floating point number at the current readerIndex in Little Endian Byte Order and increases the readerIndex by 4 in this buffer.
    abstract ByteBuf
    setBytes(int index, byte[] src, int srcIndex, int length)
    Transfers the specified source array's data to this buffer starting at the specified absolute index.
    abstract ByteBuf
    setBytes(int index, ByteBuf src, int srcIndex, int length)
    Transfers the specified source buffer's data to this buffer starting at the specified absolute index.
    abstract int
    setBytes(int index, InputStream in, int length)
    Transfers the content of the specified source stream to this buffer starting at the specified absolute index.
    abstract ByteBuf
    setBytes(int index, ByteBuffer src)
    Transfers the specified source buffer's data to this buffer starting at the specified absolute index until the source buffer's position reaches its limit.
    abstract 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 absolute index.
    abstract int
    setBytes(int index, ScatteringByteChannel in, int length)
    Transfers the content of the specified source channel to this buffer starting at the specified absolute index.
    setDoubleLE(int index, double value)
    Sets the specified 64-bit floating-point number at the specified absolute index in this buffer in Little Endian Byte Order.
    setFloatLE(int index, float value)
    Sets the specified 32-bit floating-point number at the specified absolute index in this buffer in Little Endian Byte Order.
    abstract ByteBuf
    Return the underlying buffer instance if this buffer is a wrapper of another buffer.
    writeDoubleLE(double value)
    Sets the specified 64-bit floating point number at the current writerIndex in Little Endian Byte Order and increases the writerIndex by 8 in this buffer.
    writeFloatLE(float value)
    Sets the specified 32-bit floating point number at the current writerIndex in Little Endian Byte Order and increases the writerIndex by 4 in this buffer.

    Methods inherited from class Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • AbstractDerivedByteBuf

      protected AbstractDerivedByteBuf(int maxCapacity)
      Deprecated.
  • Method Details

    • refCnt

      public final int refCnt()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Returns the reference count of this object. If 0, it means this object has been deallocated.
    • retain

      public final ByteBuf retain()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Increases the reference count by 1.
      Specified by:
      retain in interface ReferenceCounted
      Specified by:
      retain in class ByteBuf
    • retain

      public final ByteBuf retain(int increment)
      Deprecated.
      Description copied from interface: ReferenceCounted
      Increases the reference count by the specified increment.
      Specified by:
      retain in interface ReferenceCounted
      Specified by:
      retain in class ByteBuf
    • touch

      public final ByteBuf touch()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Records the current access location of this object for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector. This method is a shortcut to touch(null).
      Specified by:
      touch in interface ReferenceCounted
      Specified by:
      touch in class ByteBuf
    • touch

      public final ByteBuf touch(Object hint)
      Deprecated.
      Description copied from interface: ReferenceCounted
      Records the current access location of this object with an additional arbitrary information for debugging purposes. If this object is determined to be leaked, the information recorded by this operation will be provided to you via ResourceLeakDetector.
      Specified by:
      touch in interface ReferenceCounted
      Specified by:
      touch in class ByteBuf
    • release

      public final boolean release()
      Deprecated.
      Description copied from interface: ReferenceCounted
      Decreases the reference count by 1 and deallocates this object if the reference count reaches at 0.
      Returns:
      true if and only if the reference count became 0 and this object has been deallocated
    • release

      public final boolean release(int decrement)
      Deprecated.
      Description copied from interface: ReferenceCounted
      Decreases the reference count by the specified decrement and deallocates this object if the reference count reaches at 0.
      Returns:
      true if and only if the reference count became 0 and this object has been deallocated
    • isReadOnly

      public boolean isReadOnly()
      Deprecated.
      Description copied from class: ByteBuf
      Returns true if and only if this buffer is read-only.
      Overrides:
      isReadOnly in class AbstractByteBuf
    • internalNioBuffer

      public ByteBuffer internalNioBuffer(int index, int length)
      Deprecated.
      Description copied from class: ByteBuf
      Internal use only: Exposes the internal NIO buffer.
      Specified by:
      internalNioBuffer in class ByteBuf
    • nioBuffer

      public ByteBuffer nioBuffer(int index, int length)
      Deprecated.
      Description copied from class: ByteBuf
      Exposes this buffer's sub-region as an NIO ByteBuffer. 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 modify readerIndex or writerIndex 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:
      nioBuffer in class ByteBuf
      See Also:
    • isContiguous

      public boolean isContiguous()
      Deprecated.
      Description copied from class: ByteBuf
      Returns true if this ByteBuf implementation is backed by a single memory region. Composite buffer implementations must return false even if they currently hold ≤ 1 components. For buffers that return true, it's guaranteed that a successful call to ByteBuf.discardReadBytes() will increase the value of ByteBuf.maxFastWritableBytes() by the current readerIndex.

      This method will return false by default, and a false return value does not necessarily mean that the implementation is composite or that it is not backed by a single memory region.

      Overrides:
      isContiguous in class ByteBuf