abstract class AbstractUnsafeSwappedByteBuf extends SwappedByteBuf
SwappedByteBuf for ByteBufs that is using unsafe.| Modifier and Type | Field and Description |
|---|---|
private boolean |
nativeByteOrder |
private AbstractByteBuf |
wrapped |
| Constructor and Description |
|---|
AbstractUnsafeSwappedByteBuf(AbstractByteBuf buf) |
| Modifier and Type | Method and Description |
|---|---|
protected abstract int |
_getInt(AbstractByteBuf wrapped,
int index) |
protected abstract long |
_getLong(AbstractByteBuf wrapped,
int index) |
protected abstract short |
_getShort(AbstractByteBuf wrapped,
int index) |
protected abstract void |
_setInt(AbstractByteBuf wrapped,
int index,
int value) |
protected abstract void |
_setLong(AbstractByteBuf wrapped,
int index,
long value) |
protected abstract void |
_setShort(AbstractByteBuf wrapped,
int index,
short value) |
char |
getChar(int index)
Gets a 2-byte UTF-16 character at the specified absolute
index in this buffer. |
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. |
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. |
long |
getUnsignedInt(int index)
Gets an unsigned 32-bit integer at the specified absolute
index
in this buffer. |
int |
getUnsignedShort(int index)
Gets an unsigned 16-bit short integer at the specified absolute
index in this buffer. |
ByteBuf |
setChar(int index,
int value)
Sets the specified 2-byte UTF-16 character at the specified absolute
index in this buffer. |
ByteBuf |
setDouble(int index,
double value)
Sets the specified 64-bit floating-point number at the specified
absolute
index in this buffer. |
ByteBuf |
setFloat(int index,
float value)
Sets the specified 32-bit floating-point number 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 |
setShort(int index,
int value)
Sets the specified 16-bit short integer at the specified absolute
index in this buffer. |
ByteBuf |
writeChar(int value)
Sets the specified 2-byte UTF-16 character at the current
writerIndex and increases the writerIndex by 2
in this buffer. |
ByteBuf |
writeDouble(double value)
Sets the specified 64-bit floating point number at the current
writerIndex and increases the writerIndex by 8
in this buffer. |
ByteBuf |
writeFloat(float value)
Sets the specified 32-bit floating point number at the current
writerIndex and increases the writerIndex by 4
in this buffer. |
ByteBuf |
writeInt(int value)
Sets the specified 32-bit integer at the current
writerIndex
and increases the writerIndex by 4 in this buffer. |
ByteBuf |
writeLong(long value)
Sets the specified 64-bit long integer at the current
writerIndex and increases the writerIndex by 8
in this buffer. |
ByteBuf |
writeShort(int value)
Sets the specified 16-bit short integer at the current
writerIndex and increases the writerIndex by 2
in this buffer. |
alloc, array, arrayOffset, asReadOnly, bytesBefore, bytesBefore, bytesBefore, capacity, capacity, clear, compareTo, copy, copy, discardReadBytes, discardSomeReadBytes, duplicate, ensureWritable, ensureWritable, equals, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getByte, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getCharSequence, getIntLE, getLongLE, getMedium, getMediumLE, getShortLE, getUnsignedByte, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShortLE, hasArray, hashCode, hasMemoryAddress, indexOf, internalNioBuffer, isDirect, isReadable, isReadable, isReadOnly, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxWritableBytes, memoryAddress, nioBuffer, nioBuffer, nioBufferCount, nioBuffers, nioBuffers, order, 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, refCnt, release, release, resetReaderIndex, resetWriterIndex, retain, retain, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setByte, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setCharSequence, setIndex, setIntLE, setLongLE, setMedium, setMediumLE, setShortLE, setZero, skipBytes, slice, slice, toString, toString, toString, touch, touch, unwrap, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeCharSequence, writeIntLE, writeLongLE, writeMedium, writeMediumLE, writerIndex, writerIndex, writeShortLE, writeZeroprivate final boolean nativeByteOrder
private final AbstractByteBuf wrapped
AbstractUnsafeSwappedByteBuf(AbstractByteBuf buf)
public final long getLong(int index)
ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getLong in class SwappedByteBufpublic final float getFloat(int index)
ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getFloat in class SwappedByteBufpublic final double getDouble(int index)
ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getDouble in class SwappedByteBufpublic final char getChar(int index)
ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getChar in class SwappedByteBufpublic final long getUnsignedInt(int index)
ByteBufindex
in this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getUnsignedInt in class SwappedByteBufpublic final int getInt(int index)
ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getInt in class SwappedByteBufpublic final int getUnsignedShort(int index)
ByteBufindex in this buffer. This method does not modify
readerIndex or writerIndex of this buffer.getUnsignedShort in class SwappedByteBufpublic final short getShort(int index)
ByteBufindex in
this buffer. This method does not modify readerIndex or
writerIndex of this buffer.getShort in class SwappedByteBufpublic final 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 SwappedByteBufpublic final ByteBuf setInt(int index, int value)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setInt in class SwappedByteBufpublic final ByteBuf setLong(int index, long value)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setLong in class SwappedByteBufpublic final ByteBuf setChar(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.setChar in class SwappedByteBufpublic final ByteBuf setFloat(int index, float value)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setFloat in class SwappedByteBufpublic final ByteBuf setDouble(int index, double value)
ByteBufindex in this buffer.
This method does not modify readerIndex or writerIndex of
this buffer.setDouble in class SwappedByteBufpublic final ByteBuf writeShort(int value)
ByteBufwriterIndex and increases the writerIndex by 2
in this buffer. The 16 high-order bits of the specified value are ignored.writeShort in class SwappedByteBufpublic final ByteBuf writeInt(int value)
ByteBufwriterIndex
and increases the writerIndex by 4 in this buffer.writeInt in class SwappedByteBufpublic final ByteBuf writeLong(long value)
ByteBufwriterIndex and increases the writerIndex by 8
in this buffer.writeLong in class SwappedByteBufpublic final ByteBuf writeChar(int value)
ByteBufwriterIndex and increases the writerIndex by 2
in this buffer. The 16 high-order bits of the specified value are ignored.writeChar in class SwappedByteBufpublic final ByteBuf writeFloat(float value)
ByteBufwriterIndex and increases the writerIndex by 4
in this buffer.writeFloat in class SwappedByteBufpublic final ByteBuf writeDouble(double value)
ByteBufwriterIndex and increases the writerIndex by 8
in this buffer.writeDouble in class SwappedByteBufprotected abstract short _getShort(AbstractByteBuf wrapped, int index)
protected abstract int _getInt(AbstractByteBuf wrapped, int index)
protected abstract long _getLong(AbstractByteBuf wrapped, int index)
protected abstract void _setShort(AbstractByteBuf wrapped, int index, short value)
protected abstract void _setInt(AbstractByteBuf wrapped, int index, int value)
protected abstract void _setLong(AbstractByteBuf wrapped, int index, long value)