Class VarHandleByteBufferAccess


  • final class VarHandleByteBufferAccess
    extends java.lang.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.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      (package private) static int getIntBE​(byte[] memory, int index)  
      (package private) static int getIntBE​(java.nio.ByteBuffer buffer, int index)  
      (package private) static int getIntLE​(byte[] memory, int index)  
      (package private) static int getIntLE​(java.nio.ByteBuffer buffer, int index)  
      (package private) static long getLongBE​(byte[] memory, int index)  
      (package private) static long getLongBE​(java.nio.ByteBuffer buffer, int index)  
      (package private) static long getLongLE​(byte[] memory, int index)  
      (package private) static long getLongLE​(java.nio.ByteBuffer buffer, int index)  
      (package private) static short getShortBE​(byte[] memory, int index)  
      (package private) static short getShortBE​(java.nio.ByteBuffer buffer, int index)  
      (package private) static short getShortLE​(byte[] memory, int index)  
      (package private) static short getShortLE​(java.nio.ByteBuffer buffer, int index)  
      (package private) static void setIntBE​(byte[] memory, int index, int value)  
      (package private) static void setIntBE​(java.nio.ByteBuffer buffer, int index, int value)  
      (package private) static void setIntLE​(byte[] memory, int index, int value)  
      (package private) static void setIntLE​(java.nio.ByteBuffer buffer, int index, int value)  
      (package private) static void setLongBE​(byte[] memory, int index, long value)  
      (package private) static void setLongBE​(java.nio.ByteBuffer buffer, int index, long value)  
      (package private) static void setLongLE​(byte[] memory, int index, long value)  
      (package private) static void setLongLE​(java.nio.ByteBuffer buffer, int index, long value)  
      (package private) static void setShortBE​(byte[] memory, int index, int value)  
      (package private) static void setShortBE​(java.nio.ByteBuffer buffer, int index, int value)  
      (package private) static void setShortLE​(byte[] memory, int index, int value)  
      (package private) static void setShortLE​(java.nio.ByteBuffer buffer, int index, int value)  
      • Methods inherited from class java.lang.Object

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

      • VarHandleByteBufferAccess

        private VarHandleByteBufferAccess()
    • Method Detail

      • getShortBE

        static short getShortBE​(java.nio.ByteBuffer buffer,
                                int index)
      • setShortBE

        static void setShortBE​(java.nio.ByteBuffer buffer,
                               int index,
                               int value)
      • getShortLE

        static short getShortLE​(java.nio.ByteBuffer buffer,
                                int index)
      • setShortLE

        static void setShortLE​(java.nio.ByteBuffer buffer,
                               int index,
                               int value)
      • getIntBE

        static int getIntBE​(java.nio.ByteBuffer buffer,
                            int index)
      • setIntBE

        static void setIntBE​(java.nio.ByteBuffer buffer,
                             int index,
                             int value)
      • getIntLE

        static int getIntLE​(java.nio.ByteBuffer buffer,
                            int index)
      • setIntLE

        static void setIntLE​(java.nio.ByteBuffer buffer,
                             int index,
                             int value)
      • getLongBE

        static long getLongBE​(java.nio.ByteBuffer buffer,
                              int index)
      • setLongBE

        static void setLongBE​(java.nio.ByteBuffer buffer,
                              int index,
                              long value)
      • getLongLE

        static long getLongLE​(java.nio.ByteBuffer buffer,
                              int index)
      • setLongLE

        static void setLongLE​(java.nio.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)