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

    Fields
    Modifier and Type
    Field
    Description
    final long
     

    Fields inherited from class io.netty.buffer.WrappedByteBuf

    buf
  • Constructor Summary

    Constructors
    Constructor
    Description
    UnsafeDirectLittleEndian(io.netty.buffer.AbstractByteBuf buf)
    Constructs a new instance.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
     
    byte
    getByte(int index)
     
    io.netty.buffer.ByteBuf
    getBytes(int index, OutputStream out, int length)
     
    char
    getChar(int index)
     
    double
    getDouble(int index)
     
    float
    getFloat(int index)
     
    int
    getInt(int index)
     
    long
    getLong(int index)
     
    short
    getShort(int index)
     
    long
    getUnsignedInt(int index)
     
    int
    getUnsignedShort(int index)
     
    int
     
    io.netty.buffer.ByteBuf
    order(ByteOrder endianness)
     
    boolean
     
    io.netty.buffer.ByteBuf
    setByte(int index, int value)
     
    int
    setBytes(int index, InputStream in, int length)
     
    io.netty.buffer.ByteBuf
    setChar(int index, int value)
     
    io.netty.buffer.ByteBuf
    setDouble(int index, double value)
     
    io.netty.buffer.ByteBuf
    setFloat(int index, float value)
     
    io.netty.buffer.ByteBuf
    setInt(int index, int value)
     
    io.netty.buffer.ByteBuf
    setLong(int index, long value)
     
    io.netty.buffer.ByteBuf
    setShort(int index, int value)
     
    io.netty.buffer.ByteBuf
     
    io.netty.buffer.ByteBuf
    slice(int index, int length)
     
    io.netty.buffer.ByteBuf
    writeChar(int value)
     
    io.netty.buffer.ByteBuf
    writeDouble(double value)
     
    io.netty.buffer.ByteBuf
    writeFloat(float value)
     
    io.netty.buffer.ByteBuf
    writeInt(int value)
     
    io.netty.buffer.ByteBuf
    writeLong(long value)
     
    io.netty.buffer.ByteBuf
    writeShort(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, writeZero

    Methods inherited from class io.netty.buffer.ByteBuf

    asByteBuf, getDoubleLE, getFloatLE, readDoubleLE, readFloatLE, setDoubleLE, setFloatLE, writeDoubleLE, writeFloatLE

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • 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:
      getLong in class io.netty.buffer.WrappedByteBuf
    • getFloat

      public float getFloat(int index)
      Overrides:
      getFloat in class io.netty.buffer.WrappedByteBuf
    • slice

      public io.netty.buffer.ByteBuf slice()
      Overrides:
      slice in class io.netty.buffer.WrappedByteBuf
    • slice

      public io.netty.buffer.ByteBuf slice(int index, int length)
      Overrides:
      slice in class io.netty.buffer.WrappedByteBuf
    • order

      public io.netty.buffer.ByteBuf order(ByteOrder endianness)
      Overrides:
      order in class io.netty.buffer.WrappedByteBuf
    • getDouble

      public double getDouble(int index)
      Overrides:
      getDouble in class io.netty.buffer.WrappedByteBuf
    • getChar

      public char getChar(int index)
      Overrides:
      getChar in class io.netty.buffer.WrappedByteBuf
    • getUnsignedInt

      public long getUnsignedInt(int index)
      Overrides:
      getUnsignedInt in class io.netty.buffer.WrappedByteBuf
    • getInt

      public int getInt(int index)
      Overrides:
      getInt in class io.netty.buffer.WrappedByteBuf
    • getUnsignedShort

      public int getUnsignedShort(int index)
      Overrides:
      getUnsignedShort in class io.netty.buffer.WrappedByteBuf
    • getShort

      public short getShort(int index)
      Overrides:
      getShort in class io.netty.buffer.WrappedByteBuf
    • setShort

      public io.netty.buffer.ByteBuf setShort(int index, int value)
      Overrides:
      setShort in class io.netty.buffer.WrappedByteBuf
    • setInt

      public io.netty.buffer.ByteBuf setInt(int index, int value)
      Overrides:
      setInt in class io.netty.buffer.WrappedByteBuf
    • setLong

      public io.netty.buffer.ByteBuf setLong(int index, long value)
      Overrides:
      setLong in class io.netty.buffer.WrappedByteBuf
    • setChar

      public io.netty.buffer.ByteBuf setChar(int index, int value)
      Overrides:
      setChar in class io.netty.buffer.WrappedByteBuf
    • setFloat

      public io.netty.buffer.ByteBuf setFloat(int index, float value)
      Overrides:
      setFloat in class io.netty.buffer.WrappedByteBuf
    • setDouble

      public io.netty.buffer.ByteBuf setDouble(int index, double value)
      Overrides:
      setDouble in class io.netty.buffer.WrappedByteBuf
    • writeShort

      public io.netty.buffer.ByteBuf writeShort(int value)
      Overrides:
      writeShort in class io.netty.buffer.WrappedByteBuf
    • writeInt

      public io.netty.buffer.ByteBuf writeInt(int value)
      Overrides:
      writeInt in class io.netty.buffer.WrappedByteBuf
    • writeLong

      public io.netty.buffer.ByteBuf writeLong(long value)
      Overrides:
      writeLong in class io.netty.buffer.WrappedByteBuf
    • writeChar

      public io.netty.buffer.ByteBuf writeChar(int value)
      Overrides:
      writeChar in class io.netty.buffer.WrappedByteBuf
    • writeFloat

      public io.netty.buffer.ByteBuf writeFloat(float value)
      Overrides:
      writeFloat in class io.netty.buffer.WrappedByteBuf
    • writeDouble

      public io.netty.buffer.ByteBuf writeDouble(double value)
      Overrides:
      writeDouble in class io.netty.buffer.WrappedByteBuf
    • getByte

      public byte getByte(int index)
      Overrides:
      getByte in class io.netty.buffer.WrappedByteBuf
    • setByte

      public io.netty.buffer.ByteBuf setByte(int index, int value)
      Overrides:
      setByte in class io.netty.buffer.WrappedByteBuf
    • release

      public boolean release()
      Specified by:
      release in interface io.netty.util.ReferenceCounted
      Overrides:
      release in class io.netty.buffer.WrappedByteBuf
    • setBytes

      public int setBytes(int index, InputStream in, int length) throws IOException
      Overrides:
      setBytes in class io.netty.buffer.WrappedByteBuf
      Throws:
      IOException
    • getBytes

      public io.netty.buffer.ByteBuf getBytes(int index, OutputStream out, int length) throws IOException
      Overrides:
      getBytes in class io.netty.buffer.WrappedByteBuf
      Throws:
      IOException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class io.netty.buffer.WrappedByteBuf
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class io.netty.buffer.WrappedByteBuf