public final class DirectBufferUtil extends Object
| Modifier and Type | Method and Description |
|---|---|
static long |
addressOrThrow(ByteBuffer buffer)
Returns the address of the provided
buffer if and only if it is an
instance of sun.nio.ch.DirectBuffer, otherwise throws an exception. |
static void |
cleanIfInstanceOfDirectBuffer(ByteBuffer buffer)
Cleans the provided
buffer if and only if it is an
instance of sun.nio.ch.DirectBuffer |
static Class<?> |
directBufferClass()
Returns the class of sun.nio.ch.DirectBuffer.
|
public static Class<?> directBufferClass()
public static void cleanIfInstanceOfDirectBuffer(ByteBuffer buffer)
buffer if and only if it is an
instance of sun.nio.ch.DirectBufferbuffer - to cleanNullPointerException - if the provided buffer is nullpublic static long addressOrThrow(ByteBuffer buffer)
buffer if and only if it is an
instance of sun.nio.ch.DirectBuffer, otherwise throws an exception.buffer - to cleanNullPointerException - if the provided buffer is nullClassCastException - if the provided buffer is not an instance of sun.nio.ch.DirectBufferCopyright © 2023. All rights reserved.