oscript
Class OscriptBuiltins

java.lang.Object
  extended byoscript.OscriptBuiltins

public class OscriptBuiltins
extends java.lang.Object

Built in functions, etc...

Version:
1.14
Author:
Rob Clark (rob@ti.com)

Constructor Summary
OscriptBuiltins()
           
 
Method Summary
static void atExit(java.lang.Runnable r)
           
static void atExit(java.lang.Runnable r, int priority)
          Register a hook to be called at system exit.
static void exit(int status)
          Exit...
static java.io.PrintStream getErr()
           
static java.io.InputStream getIn()
           
static java.io.PrintStream getOut()
           
static long runStringTest(int cnt)
           
static void setErr(java.io.PrintStream err)
          Set the error stream.
static void setIn(java.io.InputStream in)
          Set the input stream.
static void setOut(java.io.PrintStream out)
          Set the output stream.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OscriptBuiltins

public OscriptBuiltins()
Method Detail

setIn

public static void setIn(java.io.InputStream in)
Set the input stream.

Parameters:
in - the stream to use for input

getIn

public static java.io.InputStream getIn()

setOut

public static void setOut(java.io.PrintStream out)
Set the output stream.

Parameters:
out - the stream to use for output

getOut

public static java.io.PrintStream getOut()

setErr

public static void setErr(java.io.PrintStream err)
Set the error stream.

Parameters:
err - the stream to use for error output

getErr

public static java.io.PrintStream getErr()

exit

public static void exit(int status)
Exit... this is a bit safer than calling System.exit() directly, because it will run the at-exit runnables *before* calling exit. They should still be run *in theory* if you call System.exit() directly, but it seems that is not always reliable


atExit

public static void atExit(java.lang.Runnable r,
                          int priority)
Register a hook to be called at system exit. The runnables are prioritized, and the ones with higher priority (lower numerical priority value) will be invoked first.

Parameters:
r - runnable to call
priority - lower numerical value is higher priority

atExit

public static void atExit(java.lang.Runnable r)

runStringTest

public static final long runStringTest(int cnt)