final class UnpooledUnsafeHeapByteBuf extends UnpooledHeapByteBuf
arrayleakDetector, readerIndex, writerIndex| Constructor and Description |
|---|
UnpooledUnsafeHeapByteBuf(ByteBufAllocator alloc,
int initialCapacity,
int maxCapacity)
Creates a new heap buffer with a newly allocated byte array.
|
| Modifier and Type | Method and Description |
|---|---|
protected byte |
_getByte(int index) |
protected int |
_getInt(int index) |
protected long |
_getLong(int index) |
protected short |
_getShort(int index) |
protected int |
_getUnsignedMedium(int index) |
protected void |
_setByte(int index,
int value) |
protected void |
_setInt(int index,
int value) |
protected void |
_setLong(int index,
long value) |
protected void |
_setMedium(int index,
int value) |
protected void |
_setShort(int index,
int value) |
private void |
_setZero(int index,
int length) |
byte |
getByte(int index)
Gets a byte 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. |
long |
getLong(int index)
Gets a 64-bit long integer at the specified absolute
index in
this buffer. |
short |
getShort(int index)
Gets a 16-bit short integer at the specified absolute
index in
this buffer. |
int |
getUnsignedMedium(int index)
Gets an unsigned 24-bit medium integer at the specified absolute
index in this buffer. |
protected SwappedByteBuf |
newSwappedByteBuf()
Deprecated.
|
ByteBuf |
setByte(int index,
int value)
Sets the specified byte at the specified absolute
index in this
buffer. |
ByteBuf |
setInt(int index,
int value)
Sets the specified 32-bit integer at the specified absolute
index in this buffer. |
ByteBuf |
setLong(int index,
long value)
Sets the specified 64-bit long integer at the specified absolute
index in this buffer. |
ByteBuf |
setMedium(int index,
int value)
Sets the specified 24-bit medium integer at the specified absolute
index in this buffer. |
ByteBuf |
setShort(int index,
int value)
Sets the specified 16-bit short integer at the specified absolute
index in this buffer. |
ByteBuf |
setZero(int index,
int length)
Fills this buffer with NUL (0x00) starting at the specified
absolute
index. |
ByteBuf |
writeZero(int length)
Fills this buffer with NUL (0x00) starting at the current
writerIndex and increases the writerIndex by the
specified length. |
alloc, array, arrayOffset, capacity, capacity, copy, deallocate, getBytes, getBytes, getBytes, getBytes, getBytes, hasArray, hasMemoryAddress, internalNioBuffer, isDirect, memoryAddress, nioBuffer, nioBufferCount, nioBuffers, order, readBytes, setBytes, setBytes, setBytes, setBytes, setBytes, unwraprefCnt, release, release, retain, retain, setRefCntadjustMarkers, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkIndex, checkIndex, checkIndex0, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardMarks, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getBytes, getBytes, getBytes, getChar, getDouble, getFloat, getMedium, getUnsignedByte, getUnsignedInt, getUnsignedShort, hashCode, indexOf, isReadable, isReadable, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxCapacity, maxWritableBytes, nioBuffer, nioBuffers, order, readableBytes, readBoolean, readByte, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readBytes, readChar, readDouble, readerIndex, readerIndex, readFloat, readInt, readLong, readMedium, readShort, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedMedium, readUnsignedShort, resetReaderIndex, resetWriterIndex, setBoolean, setBytes, setBytes, setBytes, setChar, setDouble, setFloat, setIndex, setIndex0, skipBytes, slice, slice, toString, toString, toString, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeChar, writeDouble, writeFloat, writeInt, writeLong, writeMedium, writerIndex, writerIndex, writeShortUnpooledUnsafeHeapByteBuf(ByteBufAllocator alloc, int initialCapacity, int maxCapacity)
initialCapacity - the initial capacity of the underlying byte arraymaxCapacity - the max capacity of the underlying byte arraypublic byte getByte(int index)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.getByte in class UnpooledHeapByteBufprotected byte _getByte(int index)
_getByte in class UnpooledHeapByteBufpublic short getShort(int index)
ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getShort in class UnpooledHeapByteBufprotected short _getShort(int index)
_getShort in class UnpooledHeapByteBufpublic int getUnsignedMedium(int index)
ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getUnsignedMedium in class UnpooledHeapByteBufprotected int _getUnsignedMedium(int index)
_getUnsignedMedium in class UnpooledHeapByteBufpublic int getInt(int index)
ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getInt in class UnpooledHeapByteBufprotected int _getInt(int index)
_getInt in class UnpooledHeapByteBufpublic long getLong(int index)
ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getLong in class UnpooledHeapByteBufprotected long _getLong(int index)
_getLong in class UnpooledHeapByteBufpublic ByteBuf setByte(int index, int value)
ByteBufindex in this
buffer. The 24 high-order bits of the specified value are ignored.
This method does not modify readerIndex or writerIndex of
this buffer.setByte in class UnpooledHeapByteBufprotected void _setByte(int index,
int value)
_setByte in class UnpooledHeapByteBufpublic ByteBuf setShort(int index, int value)
ByteBufindex in this buffer. The 16 high-order bits of the specified
value are ignored.
This method does not modify readerIndex or writerIndex of
this buffer.setShort in class UnpooledHeapByteBufprotected void _setShort(int index,
int value)
_setShort in class UnpooledHeapByteBufpublic ByteBuf setMedium(int index, int value)
ByteBufindex in this buffer. Please note that the most significant
byte is ignored in the specified value.
This method does not modify readerIndex or writerIndex of
this buffer.setMedium in class UnpooledHeapByteBufprotected void _setMedium(int index,
int value)
_setMedium in class UnpooledHeapByteBufpublic ByteBuf setInt(int index, int value)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setInt in class UnpooledHeapByteBufprotected void _setInt(int index,
int value)
_setInt in class UnpooledHeapByteBufpublic ByteBuf setLong(int index, long value)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setLong in class UnpooledHeapByteBufprotected void _setLong(int index,
long value)
_setLong in class UnpooledHeapByteBufpublic ByteBuf setZero(int index, int length)
ByteBufindex.
This method does not modify readerIndex or writerIndex of
this buffer.setZero in class AbstractByteBuflength - the number of NULs to write to the bufferpublic ByteBuf writeZero(int length)
ByteBufwriterIndex and increases the writerIndex by the
specified length.writeZero in class AbstractByteBuflength - the number of NULs to write to the bufferprivate void _setZero(int index,
int length)
@Deprecated protected SwappedByteBuf newSwappedByteBuf()
AbstractByteBufSwappedByteBuf for this ByteBuf instance.newSwappedByteBuf in class AbstractByteBuf