Top Description Fields Constructors Methods
io.netty.buffer

pack-priv abstract Class AbstractUnsafeSwappedByteBuf

extends SwappedByteBuf
Class Inheritance
Known Direct Subclasses
io.netty.buffer.UnsafeDirectSwappedByteBuf, io.netty.buffer.UnsafeHeapSwappedByteBuf
Imports
io.netty.util.internal.PlatformDependent, java.nio.ByteOrder

Deprecated

as a consequence of SwappedByteBuf being deprecated. See corresponding docs for further information.

Special SwappedByteBuf for ByteBufs that is using unsafe.

Field Summary

Modifier and TypeField and Description
private final boolean
private final AbstractByteBuf

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod 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)

public final char
getChar(int index)

Overrides io.netty.buffer.SwappedByteBuf.getChar.

Gets a 2-byte UTF-16 character at the specified absolute index in this buffer.
public final double
getDouble(int index)

Overrides io.netty.buffer.SwappedByteBuf.getDouble.

Gets a 64-bit floating point number at the specified absolute index in this buffer.
public final float
getFloat(int index)

Overrides io.netty.buffer.SwappedByteBuf.getFloat.

Gets a 32-bit floating point number at the specified absolute index in this buffer.
public final int
getInt(int index)

Overrides io.netty.buffer.SwappedByteBuf.getInt.

Gets a 32-bit integer at the specified absolute index in this buffer.
public final long
getLong(int index)

Overrides io.netty.buffer.SwappedByteBuf.getLong.

Gets a 64-bit long integer at the specified absolute index in this buffer.
public final short
getShort(int index)

Overrides io.netty.buffer.SwappedByteBuf.getShort.

Gets a 16-bit short integer at the specified absolute index in this buffer.
public final long
getUnsignedInt(int index)

Overrides io.netty.buffer.SwappedByteBuf.getUnsignedInt.

Gets an unsigned 32-bit integer at the specified absolute index in this buffer.
public final int
getUnsignedShort(int index)

Overrides io.netty.buffer.SwappedByteBuf.getUnsignedShort.

Gets an unsigned 16-bit short integer at the specified absolute index in this buffer.
public final ByteBuf
setChar(int index, int value)

Overrides io.netty.buffer.SwappedByteBuf.setChar.

Sets the specified 2-byte UTF-16 character at the specified absolute index in this buffer.
public final ByteBuf
setDouble(int index, double value)

Overrides io.netty.buffer.SwappedByteBuf.setDouble.

Sets the specified 64-bit floating-point number at the specified absolute index in this buffer.
public final ByteBuf
setFloat(int index, float value)

Overrides io.netty.buffer.SwappedByteBuf.setFloat.

Sets the specified 32-bit floating-point number at the specified absolute index in this buffer.
public final ByteBuf
setInt(int index, int value)

Overrides io.netty.buffer.SwappedByteBuf.setInt.

Sets the specified 32-bit integer at the specified absolute index in this buffer.
public final ByteBuf
setLong(int index, long value)

Overrides io.netty.buffer.SwappedByteBuf.setLong.

Sets the specified 64-bit long integer at the specified absolute index in this buffer.
public final ByteBuf
setShort(int index, int value)

Overrides io.netty.buffer.SwappedByteBuf.setShort.

Sets the specified 16-bit short integer at the specified absolute index in this buffer.
public final ByteBuf
writeChar(int value)

Overrides io.netty.buffer.SwappedByteBuf.writeChar.

Sets the specified 2-byte UTF-16 character at the current writerIndex and increases the writerIndex by 2 in this buffer.
public final ByteBuf
writeDouble(double value)

Overrides io.netty.buffer.SwappedByteBuf.writeDouble.

Sets the specified 64-bit floating point number at the current writerIndex and increases the writerIndex by 8 in this buffer.
public final ByteBuf
writeFloat(float value)

Overrides io.netty.buffer.SwappedByteBuf.writeFloat.

Sets the specified 32-bit floating point number at the current writerIndex and increases the writerIndex by 4 in this buffer.
public final ByteBuf
writeInt(int value)

Overrides io.netty.buffer.SwappedByteBuf.writeInt.

Sets the specified 32-bit integer at the current writerIndex and increases the writerIndex by 4 in this buffer.
public final ByteBuf
writeLong(long value)

Overrides io.netty.buffer.SwappedByteBuf.writeLong.

Sets the specified 64-bit long integer at the current writerIndex and increases the writerIndex by 8 in this buffer.
public final ByteBuf
writeShort(int value)

Overrides io.netty.buffer.SwappedByteBuf.writeShort.

Sets the specified 16-bit short integer at the current writerIndex and increases the writerIndex by 2 in this buffer.
Inherited from io.netty.buffer.SwappedByteBuf:
allocarrayarrayOffsetasReadOnlybytesBeforebytesBeforebytesBeforecapacitycapacityclearcompareTocopycopydiscardReadBytesdiscardSomeReadBytesduplicateensureWritableensureWritableequalsforEachByteforEachByteforEachByteDescforEachByteDescgetBooleangetBytegetBytesgetBytesgetBytesgetBytesgetBytesgetBytesgetBytesgetBytesgetBytesgetCharSequencegetIntLEgetLongLEgetMediumgetMediumLEgetShortLEgetUnsignedBytegetUnsignedIntLEgetUnsignedMediumgetUnsignedMediumLEgetUnsignedShortLEhasArrayhashCodehasMemoryAddressindexOfinternalNioBufferisAccessibleisContiguousisDirectisReadableisReadableisReadOnlyisWritableisWritablemarkReaderIndexmarkWriterIndexmaxCapacitymaxFastWritableBytesmaxWritableBytesmemoryAddressnioBuffernioBuffernioBufferCountnioBuffersnioBuffersorderorderreadableBytesreadBooleanreadBytereadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadBytesreadCharreadCharSequencereadDoublereaderIndexreaderIndexreadFloatreadIntreadIntLEreadLongreadLongLEreadMediumreadMediumLEreadRetainedSlicereadShortreadShortLEreadSlicereadUnsignedBytereadUnsignedIntreadUnsignedIntLEreadUnsignedMediumreadUnsignedMediumLEreadUnsignedShortreadUnsignedShortLErefCntreleasereleaseresetReaderIndexresetWriterIndexretainretainretainedDuplicateretainedSliceretainedSlicesetBooleansetBytesetBytessetBytessetBytessetBytessetBytessetBytessetBytessetBytessetBytessetCharSequencesetIndexsetIntLEsetLongLEsetMediumsetMediumLEsetShortLEsetZeroskipBytessliceslicetoStringtoStringtoStringtouchtouchunwrapwritableByteswriteBooleanwriteBytewriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteByteswriteCharSequencewriteIntLEwriteLongLEwriteMediumwriteMediumLEwriterIndexwriterIndexwriteShortLEwriteZero

Field Detail

nativeByteOrderback to summary
private final boolean nativeByteOrder
wrappedback to summary
private final AbstractByteBuf wrapped

Constructor Detail

AbstractUnsafeSwappedByteBufback to summary
pack-priv AbstractUnsafeSwappedByteBuf(AbstractByteBuf buf)

Method Detail

_getIntback to summary
protected abstract int _getInt(AbstractByteBuf wrapped, int index)
_getLongback to summary
protected abstract long _getLong(AbstractByteBuf wrapped, int index)
_getShortback to summary
protected abstract short _getShort(AbstractByteBuf wrapped, int index)
_setIntback to summary
protected abstract void _setInt(AbstractByteBuf wrapped, int index, int value)
_setLongback to summary
protected abstract void _setLong(AbstractByteBuf wrapped, int index, long value)
_setShortback to summary
protected abstract void _setShort(AbstractByteBuf wrapped, int index, short value)
getCharback to summary
public final char getChar(int index)

Overrides io.netty.buffer.SwappedByteBuf.getChar.

Doc from io.netty.buffer.ByteBuf.getChar.

Gets a 2-byte UTF-16 character at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getDoubleback to summary
public final double getDouble(int index)

Overrides io.netty.buffer.SwappedByteBuf.getDouble.

Doc from io.netty.buffer.ByteBuf.getDouble.

Gets a 64-bit floating point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getFloatback to summary
public final float getFloat(int index)

Overrides io.netty.buffer.SwappedByteBuf.getFloat.

Doc from io.netty.buffer.ByteBuf.getFloat.

Gets a 32-bit floating point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getIntback to summary
public final int getInt(int index)

Overrides io.netty.buffer.SwappedByteBuf.getInt.

Doc from io.netty.buffer.ByteBuf.getInt.

Gets a 32-bit integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getLongback to summary
public final long getLong(int index)

Overrides io.netty.buffer.SwappedByteBuf.getLong.

Doc from io.netty.buffer.ByteBuf.getLong.

Gets a 64-bit long integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getShortback to summary
public final short getShort(int index)

Overrides io.netty.buffer.SwappedByteBuf.getShort.

Doc from io.netty.buffer.ByteBuf.getShort.

Gets a 16-bit short integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getUnsignedIntback to summary
public final long getUnsignedInt(int index)

Overrides io.netty.buffer.SwappedByteBuf.getUnsignedInt.

Doc from io.netty.buffer.ByteBuf.getUnsignedInt.

Gets an unsigned 32-bit integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
getUnsignedShortback to summary
public final int getUnsignedShort(int index)

Overrides io.netty.buffer.SwappedByteBuf.getUnsignedShort.

Doc from io.netty.buffer.ByteBuf.getUnsignedShort.

Gets an unsigned 16-bit short integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
setCharback to summary
public final ByteBuf setChar(int index, int value)

Overrides io.netty.buffer.SwappedByteBuf.setChar.

Doc from io.netty.buffer.ByteBuf.setChar.

Sets the specified 2-byte UTF-16 character at the specified absolute 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.

Annotations
@Override
setDoubleback to summary
public final ByteBuf setDouble(int index, double value)

Overrides io.netty.buffer.SwappedByteBuf.setDouble.

Doc from io.netty.buffer.ByteBuf.setDouble.

Sets the specified 64-bit floating-point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
setFloatback to summary
public final ByteBuf setFloat(int index, float value)

Overrides io.netty.buffer.SwappedByteBuf.setFloat.

Doc from io.netty.buffer.ByteBuf.setFloat.

Sets the specified 32-bit floating-point number at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
setIntback to summary
public final ByteBuf setInt(int index, int value)

Overrides io.netty.buffer.SwappedByteBuf.setInt.

Doc from io.netty.buffer.ByteBuf.setInt.

Sets the specified 32-bit integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
setLongback to summary
public final ByteBuf setLong(int index, long value)

Overrides io.netty.buffer.SwappedByteBuf.setLong.

Doc from io.netty.buffer.ByteBuf.setLong.

Sets the specified 64-bit long integer at the specified absolute index in this buffer. This method does not modify readerIndex or writerIndex of this buffer.

Annotations
@Override
setShortback to summary
public final ByteBuf setShort(int index, int value)

Overrides io.netty.buffer.SwappedByteBuf.setShort.

Doc from io.netty.buffer.ByteBuf.setShort.

Sets the specified 16-bit short integer at the specified absolute 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.

Annotations
@Override
writeCharback to summary
public final ByteBuf writeChar(int value)

Overrides io.netty.buffer.SwappedByteBuf.writeChar.

Doc from io.netty.buffer.ByteBuf.writeChar.

Sets the specified 2-byte UTF-16 character at the current writerIndex and increases the writerIndex by 2 in this buffer. The 16 high-order bits of the specified value are ignored. If this.writableBytes is less than 2, ensureWritable(int) will be called in an attempt to expand capacity to accommodate.

Annotations
@Override
writeDoubleback to summary
public final ByteBuf writeDouble(double value)

Overrides io.netty.buffer.SwappedByteBuf.writeDouble.

Doc from io.netty.buffer.ByteBuf.writeDouble.

Sets the specified 64-bit floating point number at the current writerIndex and increases the writerIndex by 8 in this buffer. If this.writableBytes is less than 8, ensureWritable(int) will be called in an attempt to expand capacity to accommodate.

Annotations
@Override
writeFloatback to summary
public final ByteBuf writeFloat(float value)

Overrides io.netty.buffer.SwappedByteBuf.writeFloat.

Doc from io.netty.buffer.ByteBuf.writeFloat.

Sets the specified 32-bit floating point number at the current writerIndex and increases the writerIndex by 4 in this buffer. If this.writableBytes is less than 4, ensureWritable(int) will be called in an attempt to expand capacity to accommodate.

Annotations
@Override
writeIntback to summary
public final ByteBuf writeInt(int value)

Overrides io.netty.buffer.SwappedByteBuf.writeInt.

Doc from io.netty.buffer.ByteBuf.writeInt.

Sets the specified 32-bit integer at the current writerIndex and increases the writerIndex by 4 in this buffer. If this.writableBytes is less than 4, ensureWritable(int) will be called in an attempt to expand capacity to accommodate.

Annotations
@Override
writeLongback to summary
public final ByteBuf writeLong(long value)

Overrides io.netty.buffer.SwappedByteBuf.writeLong.

Doc from io.netty.buffer.ByteBuf.writeLong.

Sets the specified 64-bit long integer at the current writerIndex and increases the writerIndex by 8 in this buffer. If this.writableBytes is less than 8, ensureWritable(int) will be called in an attempt to expand capacity to accommodate.

Annotations
@Override
writeShortback to summary
public final ByteBuf writeShort(int value)

Overrides io.netty.buffer.SwappedByteBuf.writeShort.

Doc from io.netty.buffer.ByteBuf.writeShort.

Sets the specified 16-bit short integer at the current writerIndex and increases the writerIndex by 2 in this buffer. The 16 high-order bits of the specified value are ignored. If this.writableBytes is less than 2, ensureWritable(int) will be called in an attempt to expand capacity to accommodate.

Annotations
@Override