public final class System extends Object
Modifier and Type | Field and Description |
---|---|
static PrintStream |
err |
static InputStream |
in |
static PrintStream |
out |
Modifier and Type | Method and Description |
---|---|
static void |
arraycopy(Object src,
int srcOffset,
Object dest,
int destOffset,
int length)
Copies one array to another.
|
static long |
currentTimeMillis()
Current time expressed in milliseconds.
|
static void |
exit(int code)
Terminate the application.
|
static void |
gc()
Collect garbage
|
static String |
getProperty(String name)
Returns
null . |
static String |
getProperty(String name,
String def)
Returns
def . |
static Runtime |
getRuntime()
Get the singleton instance of Runtime.
|
static int |
identityHashCode(Object obj) |
static long |
nanoTime()
Return the time since system start in nano-seconds
|
static void |
setErr(PrintStream err)
Redirect System.err
|
static void |
setIn(InputStream in)
Redirect System.in
|
static void |
setOut(PrintStream out)
Redirect System.out
|
public static PrintStream err
public static InputStream in
public static PrintStream out
public static void arraycopy(Object src, int srcOffset, Object dest, int destOffset, int length)
public static long currentTimeMillis()
public static void exit(int code)
public static void gc()
public static String getProperty(String name)
null
. In TiJOS, there are no system properties. So this
function returns null
.name
- name of the system propertynull
public static String getProperty(String name, String def)
def
. In TiJOS, there are no system properties. So this
function returns def
.name
- name of the system propertydef
- default value that is returns if system property doesn't existdef
public static Runtime getRuntime()
public static int identityHashCode(Object obj)
public static long nanoTime()
public static void setErr(PrintStream err)
err
- a PrintStreampublic static void setIn(InputStream in)
in
- a InputStreampublic static void setOut(PrintStream out)
out
- a PrintStream