Top Description Fields Constructors Methods
io.netty.buffer

pack-priv final Class ReadOnlyUnsafeDirectByteBuf

extends ReadOnlyByteBufferBuf
Class Inheritance
Imports
io.netty.util.internal.ObjectUtil, .PlatformDependent, java.nio.ByteBuffer

Read-only ByteBuf which wraps a read-only direct ByteBuffer and use unsafe for best performance.

Field Summary

Modifier and TypeField and Description
private final long
Inherited from io.netty.buffer.ReadOnlyByteBufferBuf:
buffer

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
protected byte
protected int
protected long
protected short
protected int
private long
addr(int index)

public ByteBuf
copy(int index, int length)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.copy.

Returns a copy of this buffer's sub-region.
public ByteBuf
getBytes(int index, ByteBuf dst, int
the first index of the destination
dstIndex
,
int
the number of bytes to transfer
length
)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index.
public ByteBuf
getBytes(int index, byte[] dst, int
the first index of the destination
dstIndex
,
int
the number of bytes to transfer
length
)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index.
public boolean
hasMemoryAddress()

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.hasMemoryAddress.

Returns true if and only if this buffer has a reference to the low-level memory address that points to the backing data.
public long
memoryAddress()

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.memoryAddress.

Returns the low-level memory address that point to the first byte of ths backing data.
Inherited from io.netty.buffer.ReadOnlyByteBufferBuf:
_getIntLE_getLongLE_getShortLE_getUnsignedMediumLE_setByte_setInt_setIntLE_setLong_setLongLE_setMedium_setMediumLE_setShort_setShortLEallocarrayarrayOffsetcapacitycapacitydeallocateensureWritableensureWritablegetBytegetBytesgetBytesgetBytesgetBytesgetIntgetIntLEgetLonggetLongLEgetShortgetShortLEgetUnsignedMediumgetUnsignedMediumLEhasArrayinternalNioBufferinternalNioBufferisContiguousisDirectisReadOnlyisWritableisWritablenioBuffernioBufferCountnioBuffersordersetBytesetBytessetBytessetBytessetBytessetBytessetBytessetIntsetIntLEsetLongsetLongLEsetMediumsetMediumLEsetShortsetShortLEunwrap

Field Detail

memoryAddressback to summary
private final long memoryAddress

Constructor Detail

ReadOnlyUnsafeDirectByteBufback to summary
pack-priv ReadOnlyUnsafeDirectByteBuf(ByteBufAllocator allocator, ByteBuffer byteBuffer)

Method Detail

_getByteback to summary
protected byte _getByte(int index)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf._getByte.

Annotations
@Override
_getIntback to summary
protected int _getInt(int index)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf._getInt.

Annotations
@Override
_getLongback to summary
protected long _getLong(int index)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf._getLong.

Annotations
@Override
_getShortback to summary
protected short _getShort(int index)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf._getShort.

Annotations
@Override
_getUnsignedMediumback to summary
protected int _getUnsignedMedium(int index)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf._getUnsignedMedium.

Annotations
@Override
addrback to summary
private long addr(int index)
copyback to summary
public ByteBuf copy(int index, int length)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.copy.

Doc from io.netty.buffer.ByteBuf.copy.

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 modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getBytesback to summary
public ByteBuf getBytes(int index, ByteBuf dst, int dstIndex, int length)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.getBytes.

Doc from io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index. This method does not modify readerIndex or writerIndex of both the source (i.e. this) and the destination.

Parameters
dstIndex:int

the first index of the destination

length:int

the number of bytes to transfer

Annotations
@Override
getBytesback to summary
public ByteBuf getBytes(int index, byte[] dst, int dstIndex, int length)

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.getBytes.

Doc from io.netty.buffer.ByteBuf.getBytes.

Transfers this buffer's data to the specified destination starting at the specified absolute index. This method does not modify readerIndex or writerIndex of this buffer.

Parameters
dstIndex:int

the first index of the destination

length:int

the number of bytes to transfer

Annotations
@Override
hasMemoryAddressback to summary
public boolean hasMemoryAddress()

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.hasMemoryAddress.

Doc from io.netty.buffer.ByteBuf.hasMemoryAddress.

Returns true if and only if this buffer has a reference to the low-level memory address that points to the backing data.

Annotations
@Override
memoryAddressback to summary
public long memoryAddress()

Overrides io.netty.buffer.ReadOnlyByteBufferBuf.memoryAddress.

Doc from io.netty.buffer.ByteBuf.memoryAddress.

Returns the low-level memory address that point to the first byte of ths backing data.

Annotations
@Override