Package io.netty.channel.unix
Class Buffer
- java.lang.Object
-
- io.netty.channel.unix.Buffer
-
@UnstableApi public final class Buffer extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static int
addressSize()
Returns the size of a pointer.static CleanableDirectBuffer
allocateDirectBufferWithNativeOrder(int capacity)
Returns a newCleanableDirectBuffer
which has the sameByteOrder
as the native order of the machine.static java.nio.ByteBuffer
allocateDirectWithNativeOrder(int capacity)
Deprecated.UseallocateDirectBufferWithNativeOrder(int)
instead.static void
free(java.nio.ByteBuffer buffer)
Deprecated.UseallocateDirectBufferWithNativeOrder(int)
instead.static long
memoryAddress(java.nio.ByteBuffer buffer)
Returns the memory address of the given directByteBuffer
.static java.nio.ByteBuffer
wrapMemoryAddress(long memoryAddress, int capacity)
static java.nio.ByteBuffer
wrapMemoryAddressWithNativeOrder(long memoryAddress, int capacity)
-
-
-
Method Detail
-
free
@Deprecated public static void free(java.nio.ByteBuffer buffer)
Deprecated.UseallocateDirectBufferWithNativeOrder(int)
instead.Free the directByteBuffer
.
-
allocateDirectWithNativeOrder
@Deprecated public static java.nio.ByteBuffer allocateDirectWithNativeOrder(int capacity)
Deprecated.UseallocateDirectBufferWithNativeOrder(int)
instead.Returns a newByteBuffer
which has the sameByteOrder
as the native order of the machine.
-
allocateDirectBufferWithNativeOrder
public static CleanableDirectBuffer allocateDirectBufferWithNativeOrder(int capacity)
Returns a newCleanableDirectBuffer
which has the sameByteOrder
as the native order of the machine.
-
memoryAddress
public static long memoryAddress(java.nio.ByteBuffer buffer)
Returns the memory address of the given directByteBuffer
.
-
addressSize
public static int addressSize()
Returns the size of a pointer.
-
wrapMemoryAddressWithNativeOrder
public static java.nio.ByteBuffer wrapMemoryAddressWithNativeOrder(long memoryAddress, int capacity)
-
wrapMemoryAddress
public static java.nio.ByteBuffer wrapMemoryAddress(long memoryAddress, int capacity)
-
-