public class Runtime
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.Object[] |
arrayDeepClone(java.lang.Object[] a) |
static int |
currentDayOfMonth(Principal dummy) |
static int |
currentHour(Principal dummy) |
static int |
currentMinute(Principal dummy) |
static int |
currentMonth(Principal dummy) |
static java.lang.String |
currentUser() |
static int |
currentYear(Principal dummy) |
java.io.PrintStream |
err()
Get the standard error output parameterized by the default label, which
has only one reader: the principal of this
Runtime object. |
static Runtime |
getRuntime(Principal p)
Gets a
Runtime object parameterized with the
principal p. |
static Principal |
getUser(Principal parameter,
java.lang.String username)
Get a native user
|
java.io.InputStream |
in()
Get the standard input parameterized by the default label, which
has only one reader: the principal of this
Runtime object. |
static void |
loadRuntimeLibrary() |
java.io.FileInputStream |
openFileRead(java.lang.String name,
Label L)
Opens a file input stream for reading from the file with the specific
name. |
java.io.FileOutputStream |
openFileWrite(java.lang.String name,
boolean append,
Label L)
Opens a file output stream to write a file with the specific
name. |
java.io.PrintStream |
out()
Get the standard output parameterized by the default label, which
has only one reader: the principal of this
Runtime object. |
static void |
sleep(Principal dummy,
int s) |
java.io.PrintStream |
stderr(Label l)
Gets the standard error output.
|
java.io.InputStream |
stdin(Label l)
Gets the standard input.
|
java.io.PrintStream |
stdout(Label l)
Gets the standard output.
|
static Principal |
user(Principal parameter)
Get the current user
|
public static Runtime getRuntime(Principal p) throws java.lang.SecurityException
Runtime object parameterized with the
principal p.java.lang.SecurityExceptionpublic static Principal getUser(Principal parameter, java.lang.String username)
public java.io.FileOutputStream openFileWrite(java.lang.String name,
boolean append,
Label L)
throws java.io.IOException,
java.lang.SecurityException
name.name - the file nameappend - if true, then bytes will be written to the end of the file
rather than the beginningL - the label parameter of the resulting FileOutputStreamjava.io.FileNotFoundException - if the file exists but is a directory rather than a regular file,
does not exist but cannot be created, or cannot be opened for any
other reason.java.lang.SecurityException - if l is unable to relabel to the Jif label derived from
the ACL of the file.java.io.IOExceptionpublic java.io.FileInputStream openFileRead(java.lang.String name,
Label L)
throws java.io.FileNotFoundException,
java.lang.SecurityException
name.name - the file nameL - the the label parameter of the resulting FileInputStreamjava.lang.SecurityException - if l is less restrictive than the Jif label derived from
the ACL of the file.java.io.FileNotFoundExceptionpublic java.io.PrintStream stderr(Label l)
l.public java.io.PrintStream stdout(Label l)
l.public java.io.InputStream stdin(Label l)
l.public java.io.PrintStream out()
Runtime object.public java.io.InputStream in()
Runtime object.public java.io.PrintStream err()
Runtime object.public static java.lang.String currentUser()
public static int currentYear(Principal dummy)
public static int currentMonth(Principal dummy)
public static int currentDayOfMonth(Principal dummy)
public static int currentHour(Principal dummy)
public static int currentMinute(Principal dummy)
public static void sleep(Principal dummy, int s)
public static java.lang.Object[] arrayDeepClone(java.lang.Object[] a)
public static void loadRuntimeLibrary()