Class Buffer


  • @UnstableApi
    public final class Buffer
    extends Object
    • Method Detail

      • allocateDirectBufferWithNativeOrder

        public static io.netty.util.internal.CleanableDirectBuffer allocateDirectBufferWithNativeOrder​(int capacity)
        Returns a new CleanableDirectBuffer which has the same ByteOrder as the native order of the machine.
      • memoryAddress

        public static long memoryAddress​(ByteBuffer buffer)
        Returns the memory address of the given direct ByteBuffer.
      • addressSize

        public static int addressSize()
        Returns the size of a pointer.
      • wrapMemoryAddressWithNativeOrder

        public static ByteBuffer wrapMemoryAddressWithNativeOrder​(long memoryAddress,
                                                                  int capacity)
      • wrapMemoryAddress

        public static ByteBuffer wrapMemoryAddress​(long memoryAddress,
                                                   int capacity)