final class ReadOnlyUnsafeDirectByteBuf extends ReadOnlyByteBufferBuf
| Modifier and Type | Field and Description |
|---|---|
private long |
memoryAddress |
bufferleakDetector, readerIndex, writerIndex| Constructor and Description |
|---|
ReadOnlyUnsafeDirectByteBuf(ByteBufAllocator allocator,
java.nio.ByteBuffer buffer) |
| 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) |
private long |
addr(int index) |
ByteBuf |
copy(int index,
int length)
Returns a copy of this buffer's sub-region.
|
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. |
ByteBuf |
getBytes(int index,
java.nio.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. |
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. |
_getIntLE, _getLongLE, _getShortLE, _getUnsignedMediumLE, _setByte, _setInt, _setIntLE, _setLong, _setLongLE, _setMedium, _setMediumLE, _setShort, _setShortLE, alloc, array, arrayOffset, capacity, capacity, deallocate, getByte, getBytes, getBytes, getBytes, getInt, getIntLE, getLong, getLongLE, getShort, getShortLE, getUnsignedMedium, getUnsignedMediumLE, hasArray, hasMemoryAddress, internalNioBuffer, internalNioBuffer, isDirect, isReadOnly, memoryAddress, nioBuffer, nioBufferCount, nioBuffers, order, setByte, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setInt, setIntLE, setLong, setLongLE, setMedium, setMediumLE, setShort, setShortLE, unwraprefCnt, release, release, retain, retain, setRefCnt, touch, touchadjustMarkers, asReadOnly, bytesBefore, bytesBefore, bytesBefore, checkDstIndex, checkIndex, checkIndex, checkIndex0, checkNewCapacity, checkReadableBytes, checkSrcIndex, clear, compareTo, copy, discardMarks, discardReadBytes, discardSomeReadBytes, duplicate, ensureAccessible, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, 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, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setBytes, setBytes, setBytes, setChar, setCharSequence, setDouble, setFloat, setIndex, setIndex0, setZero, skipBytes, slice, slice, toString, toString, toString, 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, writeZeroReadOnlyUnsafeDirectByteBuf(ByteBufAllocator allocator, java.nio.ByteBuffer buffer)
protected byte _getByte(int index)
_getByte in class ReadOnlyByteBufferBufprotected short _getShort(int index)
_getShort in class ReadOnlyByteBufferBufprotected int _getUnsignedMedium(int index)
_getUnsignedMedium in class ReadOnlyByteBufferBufprotected int _getInt(int index)
_getInt in class ReadOnlyByteBufferBufprotected long _getLong(int index)
_getLong in class ReadOnlyByteBufferBufpublic ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length)
ByteBufindex.
This method does not modify readerIndex or writerIndex
of both the source (i.e. this) and the destination.getBytes in class ReadOnlyByteBufferBufdstIndex - the first index of the destinationlength - the number of bytes to transferpublic ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length)
ByteBufindex.
This method does not modify readerIndex or writerIndex
of this buffer.getBytes in class ReadOnlyByteBufferBufdstIndex - the first index of the destinationlength - the number of bytes to transferpublic ByteBuf getBytes(int index, java.nio.ByteBuffer dst)
ByteBufindex until the destination's position
reaches its limit.
This method does not modify readerIndex or writerIndex of
this buffer while the destination's position will be increased.getBytes in class ReadOnlyByteBufferBufpublic ByteBuf copy(int index, int length)
ByteBufreaderIndex or writerIndex of
this buffer.copy in class ReadOnlyByteBufferBufprivate long addr(int index)