@InterfaceAudience.Private @InterfaceStability.Evolving public final class UnsafeAccess extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BYTE_ARRAY_BASE_OFFSET
The offset to the first element in a byte array.
|
static sun.misc.Unsafe |
theUnsafe |
Modifier and Type | Method and Description |
---|---|
static void |
copy(byte[] src,
int srcOffset,
ByteBuffer dest,
int destOffset,
int length)
Copies the bytes from given array's offset to length part into the given buffer.
|
static void |
copy(ByteBuffer src,
int srcOffset,
byte[] dest,
int destOffset,
int length)
Copies specified number of bytes from given offset of
src ByteBuffer to the
dest array. |
static void |
copy(ByteBuffer src,
int srcOffset,
ByteBuffer dest,
int destOffset,
int length)
Copies specified number of bytes from given offset of
src buffer into the dest
buffer. |
public static final sun.misc.Unsafe theUnsafe
public static final int BYTE_ARRAY_BASE_OFFSET
public static void copy(byte[] src, int srcOffset, ByteBuffer dest, int destOffset, int length)
src
- srcOffset
- dest
- destOffset
- length
- public static void copy(ByteBuffer src, int srcOffset, byte[] dest, int destOffset, int length)
src
ByteBuffer to the
dest
array.src
- srcOffset
- dest
- destOffset
- length
- public static void copy(ByteBuffer src, int srcOffset, ByteBuffer dest, int destOffset, int length)
src
buffer into the dest
buffer.src
- srcOffset
- dest
- destOffset
- length
- Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.