public abstract class UnsafeHolder extends Object
hasUnsafe() returns true;| Modifier and Type | Field and Description |
|---|---|
static long |
arrayBaseOffset |
| Modifier and Type | Method and Description |
|---|---|
static void |
bufferGet(byte[] dst,
long address,
int offset,
int length,
sun.misc.Unsafe unsafe) |
static void |
bufferPut(byte[] src,
long address,
int offset,
int length,
sun.misc.Unsafe unsafe) |
static boolean |
checkBounds(int off,
int len,
int size) |
static void |
copyMemory(Object src,
long srcOffset,
Object dst,
long dstOffset,
long length,
sun.misc.Unsafe unsafe)
Copy from given source object to destination object.
|
static Method |
getDirectByteBufferAddressMethod() |
static sun.misc.Unsafe |
getUnsafe() |
static boolean |
hasUnsafe() |
static InputStreamChannel |
newChannelBufferFramedInputStream(ReadableByteChannel channel,
int bufferSize) |
static OutputStreamChannel |
newChannelBufferFramedOutputStream(WritableByteChannel channel,
int bufferSize) |
static InputStreamChannel |
newChannelBufferInputStream(ReadableByteChannel channel,
int bufferSize) |
static OutputStreamChannel |
newChannelBufferOutputStream(WritableByteChannel channel,
int bufferSize) |
public static boolean hasUnsafe()
public static Method getDirectByteBufferAddressMethod()
public static sun.misc.Unsafe getUnsafe()
public static InputStreamChannel newChannelBufferInputStream(ReadableByteChannel channel, int bufferSize) throws IOException
IOExceptionpublic static OutputStreamChannel newChannelBufferOutputStream(WritableByteChannel channel, int bufferSize) throws IOException
IOExceptionpublic static InputStreamChannel newChannelBufferFramedInputStream(ReadableByteChannel channel, int bufferSize) throws IOException
IOExceptionpublic static OutputStreamChannel newChannelBufferFramedOutputStream(WritableByteChannel channel, int bufferSize) throws IOException
IOExceptionpublic static void copyMemory(Object src, long srcOffset, Object dst, long dstOffset, long length, sun.misc.Unsafe unsafe)
src - source object; can be null in which case the
srcOffset must be a memory addresssrcOffset - offset in source object to start copydst - destination object; can be null in which case the
dstOffset must be a memory addressdstOffset - destination addresslength - number of bytes to copypublic static boolean checkBounds(int off,
int len,
int size)
public static void bufferGet(byte[] dst,
long address,
int offset,
int length,
sun.misc.Unsafe unsafe)
ByteBuffer.get(byte[], int, int)public static void bufferPut(byte[] src,
long address,
int offset,
int length,
sun.misc.Unsafe unsafe)
ByteBuffer.put(byte[], int, int)Copyright © 2010-2015 Pivotal Software, Inc. All rights reserved.