Package io.netty.buffer
Class AbstractUnsafeSwappedByteBuf
java.lang.Object
io.netty.buffer.ByteBuf
io.netty.buffer.SwappedByteBuf
io.netty.buffer.AbstractUnsafeSwappedByteBuf
- All Implemented Interfaces:
ByteBufConvertible,ReferenceCounted,Comparable<ByteBuf>
- Direct Known Subclasses:
UnsafeDirectSwappedByteBuf,UnsafeHeapSwappedByteBuf
Special
SwappedByteBuf for ByteBufs that is using unsafe.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected 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) final chargetChar(int index) Gets a 2-byte UTF-16 character at the specified absoluteindexin this buffer.final doublegetDouble(int index) Gets a 64-bit floating point number at the specified absoluteindexin this buffer.final floatgetFloat(int index) Gets a 32-bit floating point number at the specified absoluteindexin this buffer.final intgetInt(int index) Gets a 32-bit integer at the specified absoluteindexin this buffer.final longgetLong(int index) Gets a 64-bit long integer at the specified absoluteindexin this buffer.final shortgetShort(int index) Gets a 16-bit short integer at the specified absoluteindexin this buffer.final longgetUnsignedInt(int index) Gets an unsigned 32-bit integer at the specified absoluteindexin this buffer.final intgetUnsignedShort(int index) Gets an unsigned 16-bit short integer at the specified absoluteindexin this buffer.final ByteBufsetChar(int index, int value) Sets the specified 2-byte UTF-16 character at the specified absoluteindexin this buffer.final ByteBufsetDouble(int index, double value) Sets the specified 64-bit floating-point number at the specified absoluteindexin this buffer.final ByteBufsetFloat(int index, float value) Sets the specified 32-bit floating-point number at the specified absoluteindexin this buffer.final ByteBufsetInt(int index, int value) Sets the specified 32-bit integer at the specified absoluteindexin this buffer.final ByteBufsetLong(int index, long value) Sets the specified 64-bit long integer at the specified absoluteindexin this buffer.final ByteBufsetShort(int index, int value) Sets the specified 16-bit short integer at the specified absoluteindexin this buffer.final ByteBufwriteChar(int value) Sets the specified 2-byte UTF-16 character at the currentwriterIndexand increases thewriterIndexby2in this buffer.final ByteBufwriteDouble(double value) Sets the specified 64-bit floating point number at the currentwriterIndexand increases thewriterIndexby8in this buffer.final ByteBufwriteFloat(float value) Sets the specified 32-bit floating point number at the currentwriterIndexand increases thewriterIndexby4in this buffer.final ByteBufwriteInt(int value) Sets the specified 32-bit integer at the currentwriterIndexand increases thewriterIndexby4in this buffer.final ByteBufwriteLong(long value) Sets the specified 64-bit long integer at the currentwriterIndexand increases thewriterIndexby8in this buffer.final ByteBufwriteShort(int value) Sets the specified 16-bit short integer at the currentwriterIndexand increases thewriterIndexby2in this buffer.Methods inherited from class io.netty.buffer.SwappedByteBuf
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, isAccessible, isContiguous, isDirect, isReadable, isReadable, isReadOnly, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxFastWritableBytes, 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, writeZeroMethods inherited from class io.netty.buffer.ByteBuf
asByteBuf, getDoubleLE, getFloatLE, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE
-
Field Details
-
nativeByteOrder
private final boolean nativeByteOrder -
wrapped
-
-
Constructor Details
-
AbstractUnsafeSwappedByteBuf
AbstractUnsafeSwappedByteBuf(AbstractByteBuf buf)
-
-
Method Details
-
getLong
public final long getLong(int index) Description copied from class:ByteBufGets a 64-bit long integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getLongin classSwappedByteBuf
-
getFloat
public final float getFloat(int index) Description copied from class:ByteBufGets a 32-bit floating point number at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getFloatin classSwappedByteBuf
-
getDouble
public final double getDouble(int index) Description copied from class:ByteBufGets a 64-bit floating point number at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getDoublein classSwappedByteBuf
-
getChar
public final char getChar(int index) Description copied from class:ByteBufGets a 2-byte UTF-16 character at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getCharin classSwappedByteBuf
-
getUnsignedInt
public final long getUnsignedInt(int index) Description copied from class:ByteBufGets an unsigned 32-bit integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getUnsignedIntin classSwappedByteBuf
-
getInt
public final int getInt(int index) Description copied from class:ByteBufGets a 32-bit integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getIntin classSwappedByteBuf
-
getUnsignedShort
public final int getUnsignedShort(int index) Description copied from class:ByteBufGets an unsigned 16-bit short integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getUnsignedShortin classSwappedByteBuf
-
getShort
public final short getShort(int index) Description copied from class:ByteBufGets a 16-bit short integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
getShortin classSwappedByteBuf
-
setShort
Description copied from class:ByteBufSets the specified 16-bit short integer at the specified absoluteindexin this buffer. The 16 high-order bits of the specified value are ignored. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setShortin classSwappedByteBuf
-
setInt
Description copied from class:ByteBufSets the specified 32-bit integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setIntin classSwappedByteBuf
-
setLong
Description copied from class:ByteBufSets the specified 64-bit long integer at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setLongin classSwappedByteBuf
-
setChar
Description copied from class:ByteBufSets the specified 2-byte UTF-16 character at the specified absoluteindexin this buffer. The 16 high-order bits of the specified value are ignored. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setCharin classSwappedByteBuf
-
setFloat
Description copied from class:ByteBufSets the specified 32-bit floating-point number at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setFloatin classSwappedByteBuf
-
setDouble
Description copied from class:ByteBufSets the specified 64-bit floating-point number at the specified absoluteindexin this buffer. This method does not modifyreaderIndexorwriterIndexof this buffer.- Overrides:
setDoublein classSwappedByteBuf
-
writeShort
Description copied from class:ByteBufSets the specified 16-bit short integer at the currentwriterIndexand increases thewriterIndexby2in this buffer. The 16 high-order bits of the specified value are ignored. Ifthis.writableBytesis less than2,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeShortin classSwappedByteBuf
-
writeInt
Description copied from class:ByteBufSets the specified 32-bit integer at the currentwriterIndexand increases thewriterIndexby4in this buffer. Ifthis.writableBytesis less than4,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeIntin classSwappedByteBuf
-
writeLong
Description copied from class:ByteBufSets the specified 64-bit long integer at the currentwriterIndexand increases thewriterIndexby8in this buffer. Ifthis.writableBytesis less than8,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeLongin classSwappedByteBuf
-
writeChar
Description copied from class:ByteBufSets the specified 2-byte UTF-16 character at the currentwriterIndexand increases thewriterIndexby2in this buffer. The 16 high-order bits of the specified value are ignored. Ifthis.writableBytesis less than2,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeCharin classSwappedByteBuf
-
writeFloat
Description copied from class:ByteBufSets the specified 32-bit floating point number at the currentwriterIndexand increases thewriterIndexby4in this buffer. Ifthis.writableBytesis less than4,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeFloatin classSwappedByteBuf
-
writeDouble
Description copied from class:ByteBufSets the specified 64-bit floating point number at the currentwriterIndexand increases thewriterIndexby8in this buffer. Ifthis.writableBytesis less than8,ByteBuf.ensureWritable(int)will be called in an attempt to expand capacity to accommodate.- Overrides:
writeDoublein classSwappedByteBuf
-
_getShort
-
_getInt
-
_getLong
-
_setShort
-
_setInt
-
_setLong
-