public final class OsInfo
extends java.lang.Object
This class provides information about the current Operating System in a unified format. The information about the Operating System is retrieved during static initialization, therefore if the Operating System is not recognized a RuntimeException exception will be thrown and this class will be rendered useless.
Modifier and Type | Class and Description |
---|---|
static class |
OsInfo.Architecture
Enumeration of computer architectures.
|
static class |
OsInfo.DataModel
Machine data model (i.e., number of bits).
|
static class |
OsInfo.Family
Enumeration of operating system families.
|
static class |
OsInfo.Name
Enumeration of operating system names.
|
Modifier and Type | Method and Description |
---|---|
static OsInfo.Architecture |
getArch()
Retrieves the architecture of the operating system.
|
static java.lang.String |
getArchString()
Retrieves the architecture of the operating system as a string.
|
static OsInfo.DataModel |
getDataModel()
Retrieves the data model of the operating system.
|
static java.lang.String |
getDataModelString()
Retrieves the data model of the operating system as a string.
|
static OsInfo.Family |
getFamily()
Retrieves the family of the operating system.
|
static java.lang.String |
getFamilyString()
Retrieves the family of the operating system as a string.
|
static OsInfo.Name |
getName()
Retrieves the name of the operating system.
|
static java.lang.String |
getNameString()
Retrieves the name of the operating system as a string.
|
static java.lang.String |
getSummaryString()
Retrieves a summary of the operating system information as a string.
|
static java.lang.String |
getVersionString()
Retrieves the version of the operating system as a string.
|
public static OsInfo.Name getName()
public static java.lang.String getNameString()
public static java.lang.String getVersionString()
public static OsInfo.Family getFamily()
public static java.lang.String getFamilyString()
public static OsInfo.Architecture getArch()
public static java.lang.String getArchString()
public static OsInfo.DataModel getDataModel()
public static java.lang.String getDataModelString()
public static java.lang.String getSummaryString()
Copyright © 2004-2020 FEUP-LSTS and Neptus developers. All Rights Reserved.