java.lang
Class System

java.lang.Object
  extended by java.lang.System

public final class System
extends Object

System utilities.


Field Summary
static PrintStream err
           
static PrintStream out
           
 
Method Summary
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 setOut(PrintStream out)
          Redirect System.out
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public static PrintStream out

err

public static PrintStream err
Method Detail

arraycopy

public static void arraycopy(Object src,
                             int srcOffset,
                             Object dest,
                             int destOffset,
                             int length)
Copies one array to another.


exit

public static void exit(int code)
Terminate the application.


currentTimeMillis

public static long currentTimeMillis()
Current time expressed in milliseconds. In the RCX, this is the number of milliseconds since the RCX has been on. (In Java, this would be since January 1st, 1970).


getProperty

public static String getProperty(String name)
Returns null. In leJOS, there are no system properties. So this function returns null.

Parameters:
name - name of the system property
Returns:
null

getProperty

public static String getProperty(String name,
                                 String def)
Returns def. In leJOS, there are no system properties. So this function returns def.

Parameters:
name - name of the system property
def - default value that is returns if system property doesn't exist
Returns:
def

getRuntime

public static Runtime getRuntime()
Get the singleton instance of Runtime.


identityHashCode

public static int identityHashCode(Object obj)

gc

public static void gc()
Collect garbage


setOut

public static void setOut(PrintStream out)
Redirect System.out

Parameters:
out - a PrintStream

setErr

public static void setErr(PrintStream err)
Redirect System.err

Parameters:
err - a PrintStream

nanoTime

public static long nanoTime()
Return the time since system start in nano-seconds

Returns: