public class UnsafeUtils extends Object
| 构造器和说明 |
|---|
UnsafeUtils() |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
addressSize() |
static long |
allocateMemory(long size) |
static void |
copyMemory(byte[] src,
int srcIndex,
long dstAddr,
long length) |
static void |
copyMemory(long srcAddr,
byte[] dst,
int dstIndex,
long length) |
static void |
copyMemory(long srcAddr,
long dstAddr,
long length) |
static long |
directBufferAddress(ByteBuffer buffer) |
static void |
freeMemory(long address) |
static byte |
getByte(long address) |
static ClassLoader |
getClassLoader(Class<?> clazz) |
static ClassLoader |
getContextClassLoader() |
static ClassLoader |
getSystemClassLoader() |
static String |
getSystemProperty(String key,
String def)
Returns the value of the Java system property with the specified
key, while falling back to the specified default value if
the property access fails. |
static sun.misc.Unsafe |
getUnsafe() |
public static String getSystemProperty(String key, String def)
key, while falling back to the specified default value if
the property access fails.def if there's no such property or if an access to the
specified property is not allowed.public static long directBufferAddress(ByteBuffer buffer)
public static byte getByte(long address)
public static void copyMemory(long srcAddr,
long dstAddr,
long length)
public static ClassLoader getClassLoader(Class<?> clazz)
public static ClassLoader getContextClassLoader()
public static ClassLoader getSystemClassLoader()
public static int addressSize()
public static long allocateMemory(long size)
public static void freeMemory(long address)
public static void copyMemory(long srcAddr,
byte[] dst,
int dstIndex,
long length)
public static void copyMemory(byte[] src,
int srcIndex,
long dstAddr,
long length)
public static sun.misc.Unsafe getUnsafe()
Copyright © 2015. All rights reserved.