public final class PlatformDependent extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static boolean |
BIG_ENDIAN_NATIVE_ORDER |
| 限定符和类型 | 方法和说明 |
|---|---|
static int |
bitMode()
返回当前VM的位模式(通常是32或64)。
|
static boolean |
canEnableTcpNoDelayByDefault()
Returns
true 当且仅当默认启用TCP_NODELAY套接字选项没有问题时。 |
static ClassLoader |
getClassLoader(Class<?> clazz)
Return the
ClassLoader for the given Class. |
static ClassLoader |
getContextClassLoader()
Return the context
ClassLoader for the current Thread. |
static ClassLoader |
getSystemClassLoader()
Return the system
ClassLoader. |
static boolean |
isAndroid()
Returns
true 当且仅当当前平台为Android时 |
static boolean |
isIkvmDotNet()
|
static boolean |
isJ9Jvm()
|
static boolean |
isOsx()
Return
true 如果JVM在OSX/MacOS上运行 |
static boolean |
isWindows()
Return
true 如果JVM在Windows上运行 |
static int |
javaVersion()
返回使用该库的Java版本
|
static <C> Deque<C> |
newConcurrentDeque()
Returns a new concurrent
Deque. |
static String |
normalizedArch()
获取规范
|
static String |
normalizedOs()
获取系统类型
|
static Random |
threadLocalRandom()
Return a
Random 它不是线程安全的,因此只能在同一个线程中使用。 |
static File |
tmpdir()
返回临时目录。
|
public static boolean isAndroid()
true 当且仅当当前平台为Android时public static boolean isWindows()
true 如果JVM在Windows上运行public static boolean isOsx()
true 如果JVM在OSX/MacOS上运行public static int javaVersion()
public static boolean canEnableTcpNoDelayByDefault()
true 当且仅当默认启用TCP_NODELAY套接字选项没有问题时。public static File tmpdir()
public static int bitMode()
public static ClassLoader getClassLoader(Class<?> clazz)
ClassLoader for the given Class.public static ClassLoader getContextClassLoader()
ClassLoader for the current Thread.public static ClassLoader getSystemClassLoader()
ClassLoader.public static boolean isJ9Jvm()
public static boolean isIkvmDotNet()
public static String normalizedArch()
public static String normalizedOs()
Copyright © 2021. All rights reserved.