public class PlatformDetector
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ARCH_PPC |
static java.lang.String |
ARCH_SPARC |
static java.lang.String |
ARCH_X86_32 |
static java.lang.String |
ARCH_X86_64 |
static java.lang.String |
OS_LINUX |
static java.lang.String |
OS_OSX |
static java.lang.String |
OS_SOLARIS |
static java.lang.String |
OS_WINDOWS |
| Constructor and Description |
|---|
PlatformDetector() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getArch()
Get the platform architecture.
|
java.lang.String |
getByteOrder()
Get the byte order.
|
java.lang.String[] |
getChmodCmd()
Get the chmod (change permissions) command for the current
platform (if one is necessary).
|
java.lang.String |
getExecutableSuffix()
Get the file suffix used for executable files on the currently configured
platform.
|
java.lang.String |
getOs()
Get the operating system.
|
java.lang.String |
getPlatformId()
|
void |
setArch(java.lang.String aArch)
Override the architecture.
|
void |
setByteOrder(java.nio.ByteOrder aByteOrder)
Set the byte order.
|
void |
setOs(java.lang.String aOs)
Override the operating system name.
|
void |
updatePlatform(java.lang.String aOs,
java.lang.String aArch,
java.nio.ByteOrder aByteOrder)
Updates the platform-specific settings and normalizes them.
|
public static java.lang.String OS_WINDOWS
public static java.lang.String OS_OSX
public static java.lang.String OS_SOLARIS
public static java.lang.String OS_LINUX
public static java.lang.String ARCH_PPC
public static java.lang.String ARCH_X86_32
public static java.lang.String ARCH_X86_64
public static java.lang.String ARCH_SPARC
public void setOs(java.lang.String aOs)
aOs - an OS name as could be found in the os.name system
property.public java.lang.String getOs()
public void setArch(java.lang.String aArch)
aArch - "big-endian" for PowerPC or Sparc systems or
"little-endian" for x86 systems.public java.lang.String getArch()
public void setByteOrder(java.nio.ByteOrder aByteOrder)
aByteOrder - the byte order.public java.lang.String getExecutableSuffix()
public java.lang.String getByteOrder()
public java.lang.String getPlatformId()
public void updatePlatform(java.lang.String aOs,
java.lang.String aArch,
java.nio.ByteOrder aByteOrder)
aOs - the operating system string.aArch - the architecture string.aByteOrder - the byte-order string.public java.lang.String[] getChmodCmd()
Copyright © 2014. All Rights Reserved.