|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--lava.Platform
Characterizes the host platform.
Details: Platform
provides information about the current platform on which the JVM is running. This class does not provide any additional information beyond that which is already available through System.getProperty
calls, but hopefully it does make access to -- and interpretation of -- that information a bit easier.
This class is always under development as new Java platforms are being introduced. If you wish to encourage the development of this class, please return the output of the following code:
Currently available dumps are available here.
Field Summary | |
static int |
MACINTOSH
Apple Macintosh operating system. |
static int |
MS_DOS
Microsoft MS-DOS operating system. |
static int |
UNIX
Unix-style operating system. |
static int |
UNKNOWN
Indicates unknown information. |
static int |
WINDOWS
Microsoft Windows. |
Constructor Summary | |
Platform()
|
Method Summary | |
static java.lang.String |
getLineSeparator()
Returns platform's line separator. |
static int |
getOsGenre()
Determines host operating system family. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int UNKNOWN
Details: UNKNOWN
indicates that some item of information could not be determined. For example, if you are caching the return value of get_os_genre
, you can cache this value to avoid clashes with the other constants defined in this class.
public static final int UNIX
Details: UNIX indicates any of the Unix-style operating systems.
public static final int MS_DOS
Details: MS_DOS indicates the Microsoft MS-DOS operating system family.
public static final int MACINTOSH
Details: MACINTOSH indicates the Apple Macintosh operating system family.
public static final int WINDOWS
Details: WINDOWS indicates the Microsoft Windows operating system family.
Constructor Detail |
public Platform()
Method Detail |
public static final int getOsGenre()
Details: get_os_genre
identifies the operating system genre hosting the currently running JVM.
This implementation recognizes only Linux (UNIX), Windows (WINDOWS), Macintosh (MACINTOSH), and HP-UX (UNIX). If the initialization procedure detects any other platform, it will assume UNIX.
The author is currently in the process of collecting System.getProperty("os.name")
values for as many platforms as possible, so that the initialization procedure can be expanded. Submissions are welcome.
public static final java.lang.String getLineSeparator()
Details: getLineSeparator returns the default line separator for the host platform.
|
Sharkysoft home | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |