Class VarHandleByteBufferAccess

java.lang.Object
io.netty.buffer.VarHandleByteBufferAccess

final class VarHandleByteBufferAccess extends Object
Centralizes all ByteBuffer VarHandle get/set calls so classes like UnpooledDirectByteBuf don't directly reference signature-polymorphic methods. This allows avoiding class verification failures on older Android runtimes by not loading this class when VarHandle is disabled. Methods here must only be called when PlatformDependent.hasVarHandle() is true.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    private
     
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) static int
    getIntBE(byte[] memory, int index)
     
    (package private) static int
    getIntBE(ByteBuffer buffer, int index)
     
    (package private) static int
    getIntLE(byte[] memory, int index)
     
    (package private) static int
    getIntLE(ByteBuffer buffer, int index)
     
    (package private) static long
    getLongBE(byte[] memory, int index)
     
    (package private) static long
    getLongBE(ByteBuffer buffer, int index)
     
    (package private) static long
    getLongLE(byte[] memory, int index)
     
    (package private) static long
    getLongLE(ByteBuffer buffer, int index)
     
    (package private) static short
    getShortBE(byte[] memory, int index)
     
    (package private) static short
    getShortBE(ByteBuffer buffer, int index)
     
    (package private) static short
    getShortLE(byte[] memory, int index)
     
    (package private) static short
    getShortLE(ByteBuffer buffer, int index)
     
    (package private) static void
    setIntBE(byte[] memory, int index, int value)
     
    (package private) static void
    setIntBE(ByteBuffer buffer, int index, int value)
     
    (package private) static void
    setIntLE(byte[] memory, int index, int value)
     
    (package private) static void
    setIntLE(ByteBuffer buffer, int index, int value)
     
    (package private) static void
    setLongBE(byte[] memory, int index, long value)
     
    (package private) static void
    setLongBE(ByteBuffer buffer, int index, long value)
     
    (package private) static void
    setLongLE(byte[] memory, int index, long value)
     
    (package private) static void
    setLongLE(ByteBuffer buffer, int index, long value)
     
    (package private) static void
    setShortBE(byte[] memory, int index, int value)
     
    (package private) static void
    setShortBE(ByteBuffer buffer, int index, int value)
     
    (package private) static void
    setShortLE(byte[] memory, int index, int value)
     
    (package private) static void
    setShortLE(ByteBuffer buffer, int index, int value)
     

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • VarHandleByteBufferAccess

      private VarHandleByteBufferAccess()
  • Method Details

    • getShortBE

      static short getShortBE(ByteBuffer buffer, int index)
    • setShortBE

      static void setShortBE(ByteBuffer buffer, int index, int value)
    • getShortLE

      static short getShortLE(ByteBuffer buffer, int index)
    • setShortLE

      static void setShortLE(ByteBuffer buffer, int index, int value)
    • getIntBE

      static int getIntBE(ByteBuffer buffer, int index)
    • setIntBE

      static void setIntBE(ByteBuffer buffer, int index, int value)
    • getIntLE

      static int getIntLE(ByteBuffer buffer, int index)
    • setIntLE

      static void setIntLE(ByteBuffer buffer, int index, int value)
    • getLongBE

      static long getLongBE(ByteBuffer buffer, int index)
    • setLongBE

      static void setLongBE(ByteBuffer buffer, int index, long value)
    • getLongLE

      static long getLongLE(ByteBuffer buffer, int index)
    • setLongLE

      static void setLongLE(ByteBuffer buffer, int index, long value)
    • getShortBE

      static short getShortBE(byte[] memory, int index)
    • setShortBE

      static void setShortBE(byte[] memory, int index, int value)
    • getShortLE

      static short getShortLE(byte[] memory, int index)
    • setShortLE

      static void setShortLE(byte[] memory, int index, int value)
    • getIntBE

      static int getIntBE(byte[] memory, int index)
    • setIntBE

      static void setIntBE(byte[] memory, int index, int value)
    • getIntLE

      static int getIntLE(byte[] memory, int index)
    • setIntLE

      static void setIntLE(byte[] memory, int index, int value)
    • getLongBE

      static long getLongBE(byte[] memory, int index)
    • setLongBE

      static void setLongBE(byte[] memory, int index, long value)
    • getLongLE

      static long getLongLE(byte[] memory, int index)
    • setLongLE

      static void setLongLE(byte[] memory, int index, long value)