abstract class AbstractUnsafeSwappedByteBuf extends SwappedByteBuf
SwappedByteBuf
for ByteBuf
s 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, 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, getMedium, getUnsignedByte, getUnsignedMedium, hasArray, hashCode, hasMemoryAddress, indexOf, internalNioBuffer, isDirect, isReadable, isReadable, 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, readChar, readDouble, readerIndex, readerIndex, readFloat, readInt, readLong, readMedium, readShort, readSlice, readUnsignedByte, readUnsignedInt, readUnsignedMedium, readUnsignedShort, refCnt, release, release, resetReaderIndex, resetWriterIndex, retain, retain, setBoolean, setByte, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setIndex, setMedium, setZero, skipBytes, slice, slice, toString, toString, toString, unwrap, writableBytes, writeBoolean, writeByte, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeBytes, writeMedium, writerIndex, writerIndex, writeZero
private final boolean nativeByteOrder
private final AbstractByteBuf wrapped
AbstractUnsafeSwappedByteBuf(AbstractByteBuf buf)
public final long getLong(int index)
ByteBuf
index
in
this buffer. This method does not modify readerIndex
or
writerIndex
of this buffer.getLong
in class SwappedByteBuf
public final float getFloat(int index)
ByteBuf
index
in this buffer. This method does not modify
readerIndex
or writerIndex
of this buffer.getFloat
in class SwappedByteBuf
public final double getDouble(int index)
ByteBuf
index
in this buffer. This method does not modify
readerIndex
or writerIndex
of this buffer.getDouble
in class SwappedByteBuf
public final char getChar(int index)
ByteBuf
index
in this buffer. This method does not modify
readerIndex
or writerIndex
of this buffer.getChar
in class SwappedByteBuf
public final long getUnsignedInt(int index)
ByteBuf
index
in this buffer. This method does not modify readerIndex
or
writerIndex
of this buffer.getUnsignedInt
in class SwappedByteBuf
public final int getInt(int index)
ByteBuf
index
in
this buffer. This method does not modify readerIndex
or
writerIndex
of this buffer.getInt
in class SwappedByteBuf
public final int getUnsignedShort(int index)
ByteBuf
index
in this buffer. This method does not modify
readerIndex
or writerIndex
of this buffer.getUnsignedShort
in class SwappedByteBuf
public final short getShort(int index)
ByteBuf
index
in
this buffer. This method does not modify readerIndex
or
writerIndex
of this buffer.getShort
in class SwappedByteBuf
public final ByteBuf setShort(int index, int value)
ByteBuf
index
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 SwappedByteBuf
public final ByteBuf setInt(int index, int value)
ByteBuf
index
in this buffer.
This method does not modify readerIndex
or writerIndex
of
this buffer.setInt
in class SwappedByteBuf
public final ByteBuf setLong(int index, long value)
ByteBuf
index
in this buffer.
This method does not modify readerIndex
or writerIndex
of
this buffer.setLong
in class SwappedByteBuf
public final ByteBuf setChar(int index, int value)
ByteBuf
index
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 SwappedByteBuf
public final ByteBuf setFloat(int index, float value)
ByteBuf
index
in this buffer.
This method does not modify readerIndex
or writerIndex
of
this buffer.setFloat
in class SwappedByteBuf
public final ByteBuf setDouble(int index, double value)
ByteBuf
index
in this buffer.
This method does not modify readerIndex
or writerIndex
of
this buffer.setDouble
in class SwappedByteBuf
public final ByteBuf writeShort(int value)
ByteBuf
writerIndex
and increases the writerIndex
by 2
in this buffer. The 16 high-order bits of the specified value are ignored.writeShort
in class SwappedByteBuf
public final ByteBuf writeInt(int value)
ByteBuf
writerIndex
and increases the writerIndex
by 4
in this buffer.writeInt
in class SwappedByteBuf
public final ByteBuf writeLong(long value)
ByteBuf
writerIndex
and increases the writerIndex
by 8
in this buffer.writeLong
in class SwappedByteBuf
public final ByteBuf writeChar(int value)
ByteBuf
writerIndex
and increases the writerIndex
by 2
in this buffer. The 16 high-order bits of the specified value are ignored.writeChar
in class SwappedByteBuf
public final ByteBuf writeFloat(float value)
ByteBuf
writerIndex
and increases the writerIndex
by 4
in this buffer.writeFloat
in class SwappedByteBuf
public final ByteBuf writeDouble(double value)
ByteBuf
writerIndex
and increases the writerIndex
by 8
in this buffer.writeDouble
in class SwappedByteBuf
protected 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)