|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object jif.runtime.Runtime
public class Runtime
The runtime interface between Jif programs and the underlying system.
Method Summary | |
---|---|
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. |
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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static Runtime getRuntime(Principal p) throws java.lang.SecurityException
Runtime
object parameterized with the
principal p
.
java.lang.SecurityException
public static Principal user(Principal parameter)
public 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 FileOutputStream
java.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.IOException
public 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 FileInputStream
java.lang.SecurityException
- if l
is less restrictive than the Jif label derived from
the ACL of the file.
java.io.FileNotFoundException
public 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)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |