public final class OsUtilities extends Object
Modifier and Type | Class and Description |
---|---|
static class |
OsUtilities.MachineType
Enum to describe the bit architecture of a computer.
|
static class |
OsUtilities.OsFamily
Enumeration describing different operating system families.
|
Modifier and Type | Method and Description |
---|---|
static OsUtilities.MachineType |
deriveMachineType(String identifier)
Tries to guess a machine type from a name returned by
getOsArchitecture() . |
static String |
deriveMachineTypeName(String identifier)
Tries to determine a normalized machine type from a name returned by
getOsArchitecture() . |
static OsUtilities.OsFamily |
deriveOsFamily(String identifier)
Tries to determine the operating system family from a concrete operating
system name returned by
getOsName() . |
static String |
deriveOsFamilyName(String identifier)
Tries to determine a normalized operating system family from a concrete
operating system name returned by
getOsName() . |
static String |
getLocalHostName()
Returns a host name derived from name resolution for localhost.
|
static String |
getOsArchitecture()
Returns the architecture of the operating system a process is being
operated on.
|
static String |
getOsName()
Returns the name of the operating system a process is currently being
operated on.
|
public static String getOsName()
public static String deriveOsFamilyName(String identifier)
getOsName()
.identifier
- the concrete operating system name, not null
public static OsUtilities.OsFamily deriveOsFamily(String identifier)
getOsName()
.identifier
- the concrete operating system name, not null
public static String getOsArchitecture()
null
public static String deriveMachineTypeName(String identifier)
getOsArchitecture()
.identifier
- name of machine type, not null
null
public static OsUtilities.MachineType deriveMachineType(String identifier)
getOsArchitecture()
.identifier
- name of machine type, not null
null
public static String getLocalHostName()
null
if not detectableCopyright © 2018 CoR-Lab. All rights reserved.