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 i) |
static void |
gc()
Suggests that JANOS performs Garbage Collection (GC) procedures.
|
static String |
getenv(String s) |
static SecurityManager |
getSecurityManager() |
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 |
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) |
static void |
sleep(long period)
Facilitates using (@code Thread.sleep()} by providing the necessary exception handling.
|
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 exit(int i)
i
- ?public static void gc()
public static SecurityManager getSecurityManager()
public 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
- ?