public final class System extends Object
| Modifier and Type | Field and Description |
|---|---|
static PrintStream |
err
The active ERROR stream typically stderr.
|
static InputStream |
in
The active INPUT stream typically stdin.
|
static PrintStream |
out
The active OUTPUT stream typically stdout.
|
| Modifier and Type | Method and Description |
|---|---|
static void |
arraycopy(Object src,
int ofs,
Object dest,
int start,
int len)
Copies
length elements from the src array at index src_position to the
dst array at index dst_position. |
static long |
currentTimeMillis()
Returns the current time in milliseconds since the January 1st 1970 at 00:00:00 GMT epoch.
|
static void |
exit(int errorlevel)
Terminates the current program.
|
static void |
gc()
Suggests that JANOS performs Garbage Collection (GC) procedures.
|
static String |
getenv(String name)
Obtains a value from the current process environment.
|
static SecurityManager |
getSecurityManager()
Obtain the current SecurityManager.
|
static int |
identityHashCode(Object obj)
Returns the same hash code for the given object as would be returned by the default method hashCode(), whether
or not the given object's class overrides hashCode().
|
static void |
setenv(String name,
String value)
Sets a value in the current process environment.
|
static void |
setErr(PrintStream errorstream)
Reassigns the "standard" error stream.
|
static void |
setIn(InputStream inputstream)
Reassigns the "standard" input stream.
|
static void |
setOut(PrintStream outputstream)
Reassigns the "standard" output stream.
|
static void |
setSecurityManager(SecurityManager securitymanager)
Defines a Security Manager for this process.
|
static void |
sleep(long period)
Facilitates using (@code Thread.sleep()} by providing the necessary exception handling.
|
static void |
waitUntil(long time)
Utilizes Thread.sleep() to pause the current process until a specified time.
|
public static InputStream in
public static PrintStream out
public static PrintStream err
public static void arraycopy(Object src, int ofs, Object dest, int start, int len)
length elements from the src array at index src_position to the
dst array at index dst_position. The src and dst arrays must be of
the same type.src - source arrayofs - starting index in source arraydest - target arraystart - starting index in target arraylen - number of elements to copypublic static long currentTimeMillis()
JANOS.uptimeMillis()public static void sleep(long period)
period - time in milliseconds that the thread will sleep.public static void waitUntil(long time)
time - The current system time in milliseconds at which execution is to begin.public static void exit(int errorlevel)
errorlevel - Returns an integer ERRORLEVEL for command line use.public static void gc()
public static SecurityManager getSecurityManager()
public static String getenv(String name)
name - String specifying the name-value pairpublic static void setenv(String name, String value)
name - String defining the name for the name-value pairvalue - String defining the value to be assigned to the name-value pairpublic static int identityHashCode(Object obj)
obj - object for which the hashCode is to be calculatedpublic static void setIn(InputStream inputstream)
inputstream - the new standard output streampublic static void setOut(PrintStream outputstream)
outputstream - the new standard output streampublic static void setErr(PrintStream errorstream)
errorstream - the new standard error streampublic static void setSecurityManager(SecurityManager securitymanager)
securitymanager - The SecurityManager object.