|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.plumtree.openfoundation.util.XPSystem
The XPSystem
class contains several useful class fields
and methods. It cannot be instantiated.
Among the facilities provided by the XPSystem
class
are standard input, standard output, and error output streams;
access to externally defined "properties"; a means of
loading files and libraries; and a utility method for quickly
copying a portion of an array.
Nested Class Summary | |
static class |
XPSystem.Error
The "standard" error output stream. |
static class |
XPSystem.In
The "standard" input stream. |
static class |
XPSystem.Out
The "standard" output stream. |
Constructor Summary | |
XPSystem()
|
Method Summary | |
static void |
Exit(int exitCode)
Terminates the currently running Java Virtual Machine. |
static void |
GarbageCollect()
Runs the garbage collector. |
static java.lang.String |
GetCurrentDirectory()
Gets the system property indicated by the specified key. |
static long |
GetCurrentTimeMilliSec()
Returns the current time in milliseconds. |
static java.lang.String |
GetDevKitVersion()
Return the runtime environment version as a string (JDK version, .NET runtime version in Open Foundation .NET). |
static java.lang.String |
GetDirectorySeparator()
Returns the character that is used as a delimiter between the section of the path (on Windows, this should return "\"; on most UNIX platforms this should return "/"). |
static java.lang.String |
GetLocalHostName()
Returns the name of the local host. |
static java.lang.String |
GetSearchPathSeparator()
Delimiter between the directory of the search path (on Windows, this should return ";"; on most UNIX platforms this should return ":"). |
static boolean |
IsRunningInDotNet()
This is to check if dotnet is running. |
static java.lang.String |
NewLine()
This is to return new line charactor. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public XPSystem()
Method Detail |
public static long GetCurrentTimeMilliSec()
See the description of the class Date
for
a discussion of slight discrepancies that may arise between
"computer time" and coordinated universal time (UTC).
Date
public static void Exit(int exitCode)
This method calls the exit
method in class
Runtime
. This method never returns normally.
The call System.exit(n)
is effectively equivalent to
the call:
Runtime.getRuntime().exit(n)
exitCode
- exit status.
java.lang.SecurityException
- if a security manager exists and its checkExit
method doesn't allow exit with the specified status.public static java.lang.String GetCurrentDirectory()
First, if there is a security manager, its
checkPropertyAccess
method is called with the
key
as its argument.
If there is no current set of system properties, a set of system
properties is first created and initialized in the same manner as
for the getProperties
method.
java.lang.SecurityException
- if a security manager exists and its
checkPropertyAccess
method doesn't allow
access to the specified system property.
java.lang.NullPointerException
- if key
is
null
.
java.lang.IllegalArgumentException
- if key
is empty.public static void GarbageCollect()
Calling the gc
method suggests that the Java Virtual
Machine expend effort toward recycling unused objects in order to
make the memory they currently occupy available for quick reuse.
When control returns from the method call, the Java Virtual
Machine has made a best effort to reclaim space from all discarded
objects.
public static boolean IsRunningInDotNet()
public static java.lang.String NewLine()
public static java.lang.String GetSearchPathSeparator()
public static java.lang.String GetDirectorySeparator()
public static java.lang.String GetDevKitVersion()
public static java.lang.String GetLocalHostName()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |