public class DirectAccess extends Object
Constructor and Description |
---|
DirectAccess() |
Modifier and Type | Method and Description |
---|---|
static long |
getAddress(Buffer buf) |
static boolean |
isSupported() |
ByteBuffer |
prepare(long ptr,
int length)
Returns an instance-specific thread-local ByteBuffer which references any memory
address.
|
static ByteBuffer |
ref(long ptr,
int length)
Returns a thread-local ByteBuffer which references any memory address.
|
static ByteBuffer |
ref2(long ptr,
int length)
Returns a second independent thread-local ByteBuffer.
|
static void |
unref(ByteBuffer bb)
Optionally unreference a buffer.
|
public DirectAccess()
UnsupportedOperationException
- if not supportedpublic ByteBuffer prepare(long ptr, int length)
UnsupportedOperationException
- if not supportedpublic static boolean isSupported()
public static ByteBuffer ref(long ptr, int length)
UnsupportedOperationException
- if not supportedpublic static ByteBuffer ref2(long ptr, int length)
UnsupportedOperationException
- if not supportedpublic static long getAddress(Buffer buf)
public static void unref(ByteBuffer bb)
Copyright © 2011–2017 Cojen. All rights reserved.