UnpooledHeapByteBuf

Big endian Java heap buffer implementation. It is recommended to use {@link UnpooledByteBufAllocator#heapBuffer(int, int)}, {@link Unpooled#buffer(int)} and {@link Unpooled#wrappedBuffer(byte[])} instead of calling the constructor explicitly.

class UnpooledHeapByteBuf : AbstractReferenceCountedByteBuf {}

Constructors

this
this(ByteBufAllocator alloc, int initialCapacity, int maxCapacity)

Creates a new heap buffer with a newly allocated byte array.

this
this(ByteBufAllocator alloc, byte[] initialArray, int maxCapacity)

Creates a new heap buffer with an existing byte array.

Members

Functions

_getByte
byte _getByte(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getInt
int _getInt(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getIntLE
int _getIntLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getLong
long _getLong(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getLongLE
long _getLongLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getShort
short _getShort(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getShortLE
short _getShortLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getUnsignedMedium
int _getUnsignedMedium(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_getUnsignedMediumLE
int _getUnsignedMediumLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
_setByte
void _setByte(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setInt
void _setInt(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setIntLE
void _setIntLE(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setLong
void _setLong(int index, long value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setLongLE
void _setLongLE(int index, long value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setMedium
void _setMedium(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setMediumLE
void _setMediumLE(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setShort
void _setShort(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
_setShortLE
void _setShortLE(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
alloc
ByteBufAllocator alloc()
Undocumented in source. Be warned that the author may not have intended to support it.
allocateArray
byte[] allocateArray(int initialCapacity)
Undocumented in source. Be warned that the author may not have intended to support it.
array
byte[] array()
Undocumented in source. Be warned that the author may not have intended to support it.
arrayOffset
int arrayOffset()
Undocumented in source. Be warned that the author may not have intended to support it.
capacity
int capacity()
Undocumented in source. Be warned that the author may not have intended to support it.
capacity
ByteBuf capacity(int newCapacity)
Undocumented in source. Be warned that the author may not have intended to support it.
copy
ByteBuf copy(int index, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
deallocate
void deallocate()
Undocumented in source. Be warned that the author may not have intended to support it.
freeArray
void freeArray(byte[] )
Undocumented in source. Be warned that the author may not have intended to support it.
getByte
byte getByte(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getBytes
ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
getBytes
ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
getBytes
ByteBuf getBytes(int index, ByteBuffer dst)
Undocumented in source. Be warned that the author may not have intended to support it.
getBytes
ByteBuf getBytes(int index, OutputStream output, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
getInt
int getInt(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getIntLE
int getIntLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getLong
long getLong(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getLongLE
long getLongLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getShort
short getShort(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getShortLE
short getShortLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getUnsignedMedium
int getUnsignedMedium(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
getUnsignedMediumLE
int getUnsignedMediumLE(int index)
Undocumented in source. Be warned that the author may not have intended to support it.
hasArray
bool hasArray()
Undocumented in source. Be warned that the author may not have intended to support it.
hasMemoryAddress
bool hasMemoryAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
internalNioBuffer
ByteBuffer internalNioBuffer(int index, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
isDirect
bool isDirect()
Undocumented in source. Be warned that the author may not have intended to support it.
memoryAddress
long memoryAddress()
Undocumented in source. Be warned that the author may not have intended to support it.
nioBuffer
ByteBuffer nioBuffer(int index, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
nioBufferCount
int nioBufferCount()
Undocumented in source. Be warned that the author may not have intended to support it.
nioBuffers
ByteBuffer[] nioBuffers(int index, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
order
ByteOrder order()
Undocumented in source. Be warned that the author may not have intended to support it.
setByte
ByteBuf setByte(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setBytes
ByteBuf setBytes(int index, ByteBuf src, int srcIndex, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
setBytes
ByteBuf setBytes(int index, byte[] src, int srcIndex, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
setBytes
ByteBuf setBytes(int index, ByteBuffer src)
Undocumented in source. Be warned that the author may not have intended to support it.
setBytes
int setBytes(int index, InputStream input, int length)
Undocumented in source. Be warned that the author may not have intended to support it.
setInt
ByteBuf setInt(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setIntLE
ByteBuf setIntLE(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setLong
ByteBuf setLong(int index, long value)
Undocumented in source. Be warned that the author may not have intended to support it.
setLongLE
ByteBuf setLongLE(int index, long value)
Undocumented in source. Be warned that the author may not have intended to support it.
setMedium
ByteBuf setMedium(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setMediumLE
ByteBuf setMediumLE(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setShort
ByteBuf setShort(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
setShortLE
ByteBuf setShortLE(int index, int value)
Undocumented in source. Be warned that the author may not have intended to support it.
unwrap
ByteBuf unwrap()
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_array
byte[] _array;
Undocumented in source.

Inherited Members

From AbstractReferenceCountedByteBuf

IntegerFieldUpdater
alias IntegerFieldUpdater = AtomicIntegerFieldUpdater!(AbstractReferenceCountedByteBuf, "_refCnt")
Undocumented in source.
RefCntUpdater
alias RefCntUpdater = ReferenceCountUpdater!(AbstractReferenceCountedByteBuf, "_refCnt")
Undocumented in source.
isAccessible
bool isAccessible()
Undocumented in source. Be warned that the author may not have intended to support it.
refCnt
int refCnt()
Undocumented in source. Be warned that the author may not have intended to support it.
setRefCnt
void setRefCnt(int refCnt)

An unsafe operation intended for use by a subclass that sets the reference count of the buffer directly

resetRefCnt
void resetRefCnt()

An unsafe operation intended for use by a subclass that resets the reference count of the buffer to 1

retain
ByteBuf retain()
Undocumented in source. Be warned that the author may not have intended to support it.
retain
ByteBuf retain(int increment)
Undocumented in source. Be warned that the author may not have intended to support it.
touch
ByteBuf touch()
Undocumented in source. Be warned that the author may not have intended to support it.
touch
ByteBuf touch(Object hint)
Undocumented in source. Be warned that the author may not have intended to support it.
release
bool release()
Undocumented in source. Be warned that the author may not have intended to support it.
release
bool release(int decrement)
Undocumented in source. Be warned that the author may not have intended to support it.
deallocate
void deallocate()

Called once {@link #refCnt()} is equals 0.

Meta