Package io.netty.buffer
Class UnsafeDirectLittleEndian
java.lang.Object
io.netty.buffer.ByteBuf
io.netty.buffer.WrappedByteBuf
io.netty.buffer.UnsafeDirectLittleEndian
- All Implemented Interfaces:
io.netty.buffer.ByteBufConvertible,io.netty.util.ReferenceCounted,Comparable<io.netty.buffer.ByteBuf>
public class UnsafeDirectLittleEndian
extends io.netty.buffer.WrappedByteBuf
The underlying class we use for little-endian access to memory. Is used underneath ArrowBufs to
abstract away the Netty classes and underlying Netty memory management.
-
Field Summary
FieldsFields inherited from class io.netty.buffer.WrappedByteBuf
buf -
Constructor Summary
ConstructorsConstructorDescriptionUnsafeDirectLittleEndian(io.netty.buffer.AbstractByteBuf buf) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionbooleanbytegetByte(int index) io.netty.buffer.ByteBufgetBytes(int index, OutputStream out, int length) chargetChar(int index) doublegetDouble(int index) floatgetFloat(int index) intgetInt(int index) longgetLong(int index) shortgetShort(int index) longgetUnsignedInt(int index) intgetUnsignedShort(int index) inthashCode()io.netty.buffer.ByteBufbooleanrelease()io.netty.buffer.ByteBufsetByte(int index, int value) intsetBytes(int index, InputStream in, int length) io.netty.buffer.ByteBufsetChar(int index, int value) io.netty.buffer.ByteBufsetDouble(int index, double value) io.netty.buffer.ByteBufsetFloat(int index, float value) io.netty.buffer.ByteBufsetInt(int index, int value) io.netty.buffer.ByteBufsetLong(int index, long value) io.netty.buffer.ByteBufsetShort(int index, int value) io.netty.buffer.ByteBufslice()io.netty.buffer.ByteBufslice(int index, int length) io.netty.buffer.ByteBufwriteChar(int value) io.netty.buffer.ByteBufwriteDouble(double value) io.netty.buffer.ByteBufwriteFloat(float value) io.netty.buffer.ByteBufwriteInt(int value) io.netty.buffer.ByteBufwriteLong(long value) io.netty.buffer.ByteBufwriteShort(int value) Methods inherited from class io.netty.buffer.WrappedByteBuf
alloc, array, arrayOffset, asReadOnly, bytesBefore, bytesBefore, bytesBefore, capacity, capacity, clear, compareTo, copy, copy, discardReadBytes, discardSomeReadBytes, duplicate, ensureWritable, ensureWritable, forEachByte, forEachByte, forEachByteDesc, forEachByteDesc, getBoolean, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getBytes, getCharSequence, getIntLE, getLongLE, getMedium, getMediumLE, getShortLE, getUnsignedByte, getUnsignedIntLE, getUnsignedMedium, getUnsignedMediumLE, getUnsignedShortLE, hasArray, hasMemoryAddress, indexOf, internalNioBuffer, isContiguous, isDirect, isReadable, isReadable, isReadOnly, isWritable, isWritable, markReaderIndex, markWriterIndex, maxCapacity, maxFastWritableBytes, maxWritableBytes, memoryAddress, nioBuffer, nioBuffer, nioBufferCount, nioBuffers, nioBuffers, 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, readString, readUnsignedByte, readUnsignedInt, readUnsignedIntLE, readUnsignedMedium, readUnsignedMediumLE, readUnsignedShort, readUnsignedShortLE, refCnt, release, resetReaderIndex, resetWriterIndex, retain, retain, retainedDuplicate, retainedSlice, retainedSlice, setBoolean, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setBytes, setCharSequence, setIndex, setIntLE, setLongLE, setMedium, setMediumLE, setShortLE, setZero, skipBytes, 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
-
id
public final long id
-
-
Constructor Details
-
UnsafeDirectLittleEndian
public UnsafeDirectLittleEndian(io.netty.buffer.AbstractByteBuf buf) Constructs a new instance.- Parameters:
buf- The buffer to wrap
-
-
Method Details
-
getLong
public long getLong(int index) - Overrides:
getLongin classio.netty.buffer.WrappedByteBuf
-
getFloat
public float getFloat(int index) - Overrides:
getFloatin classio.netty.buffer.WrappedByteBuf
-
slice
public io.netty.buffer.ByteBuf slice()- Overrides:
slicein classio.netty.buffer.WrappedByteBuf
-
slice
public io.netty.buffer.ByteBuf slice(int index, int length) - Overrides:
slicein classio.netty.buffer.WrappedByteBuf
-
order
- Overrides:
orderin classio.netty.buffer.WrappedByteBuf
-
getDouble
public double getDouble(int index) - Overrides:
getDoublein classio.netty.buffer.WrappedByteBuf
-
getChar
public char getChar(int index) - Overrides:
getCharin classio.netty.buffer.WrappedByteBuf
-
getUnsignedInt
public long getUnsignedInt(int index) - Overrides:
getUnsignedIntin classio.netty.buffer.WrappedByteBuf
-
getInt
public int getInt(int index) - Overrides:
getIntin classio.netty.buffer.WrappedByteBuf
-
getUnsignedShort
public int getUnsignedShort(int index) - Overrides:
getUnsignedShortin classio.netty.buffer.WrappedByteBuf
-
getShort
public short getShort(int index) - Overrides:
getShortin classio.netty.buffer.WrappedByteBuf
-
setShort
public io.netty.buffer.ByteBuf setShort(int index, int value) - Overrides:
setShortin classio.netty.buffer.WrappedByteBuf
-
setInt
public io.netty.buffer.ByteBuf setInt(int index, int value) - Overrides:
setIntin classio.netty.buffer.WrappedByteBuf
-
setLong
public io.netty.buffer.ByteBuf setLong(int index, long value) - Overrides:
setLongin classio.netty.buffer.WrappedByteBuf
-
setChar
public io.netty.buffer.ByteBuf setChar(int index, int value) - Overrides:
setCharin classio.netty.buffer.WrappedByteBuf
-
setFloat
public io.netty.buffer.ByteBuf setFloat(int index, float value) - Overrides:
setFloatin classio.netty.buffer.WrappedByteBuf
-
setDouble
public io.netty.buffer.ByteBuf setDouble(int index, double value) - Overrides:
setDoublein classio.netty.buffer.WrappedByteBuf
-
writeShort
public io.netty.buffer.ByteBuf writeShort(int value) - Overrides:
writeShortin classio.netty.buffer.WrappedByteBuf
-
writeInt
public io.netty.buffer.ByteBuf writeInt(int value) - Overrides:
writeIntin classio.netty.buffer.WrappedByteBuf
-
writeLong
public io.netty.buffer.ByteBuf writeLong(long value) - Overrides:
writeLongin classio.netty.buffer.WrappedByteBuf
-
writeChar
public io.netty.buffer.ByteBuf writeChar(int value) - Overrides:
writeCharin classio.netty.buffer.WrappedByteBuf
-
writeFloat
public io.netty.buffer.ByteBuf writeFloat(float value) - Overrides:
writeFloatin classio.netty.buffer.WrappedByteBuf
-
writeDouble
public io.netty.buffer.ByteBuf writeDouble(double value) - Overrides:
writeDoublein classio.netty.buffer.WrappedByteBuf
-
getByte
public byte getByte(int index) - Overrides:
getBytein classio.netty.buffer.WrappedByteBuf
-
setByte
public io.netty.buffer.ByteBuf setByte(int index, int value) - Overrides:
setBytein classio.netty.buffer.WrappedByteBuf
-
release
public boolean release()- Specified by:
releasein interfaceio.netty.util.ReferenceCounted- Overrides:
releasein classio.netty.buffer.WrappedByteBuf
-
setBytes
- Overrides:
setBytesin classio.netty.buffer.WrappedByteBuf- Throws:
IOException
-
getBytes
- Overrides:
getBytesin classio.netty.buffer.WrappedByteBuf- Throws:
IOException
-
hashCode
public int hashCode()- Overrides:
hashCodein classio.netty.buffer.WrappedByteBuf
-
equals
- Overrides:
equalsin classio.netty.buffer.WrappedByteBuf
-