|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--com.apple.mrj.console.Redirector
The Redirector class is used to manage the redirection
of standard I/O under MRJ. Its methods are intended to be called by
the MRJShellLibrary or Drop*RunJava to arrange for correct standard
I/O behaviour as specified (somehow) by the developer.
Currently, this supports redirection from/to a file and the null device,
as well as window-based redirection, which is termed "Console"
I/O.
System.in,
System.out,
System.err,
Console,
NullInputStream,
NullOutputStream| Field Summary | |
static int |
FILE_APPEND_IO
Deprecated. Specified that the given redirection append to a file. |
static int |
FILE_IO
Deprecated. Specified that the given redirection go to, or come from, a file. |
static int |
NULL_IO
Deprecated. Specified that the given redirection go to, or come from, nowhere. |
static int |
SAME_AS_STDOUT_IO
Deprecated. Specified that the given redirection (stderr) should go where ever stdout goes |
static int |
SYSTEM_IO
Deprecated. Specified that the given redirection go to stdout/stderr or from stdin |
static int |
UNICODE_FILE_APPEND_IO
Deprecated. Specified that the given redirection append to a unicode file. |
static int |
UNICODE_FILE_IO
Deprecated. Specified that the given redirection go to, or come from, a unicode file. |
static int |
WINDOW_IO
Deprecated. Specified that the given redirection go to, or come from, a window. |
| Constructor Summary | |
Redirector()
Deprecated. |
|
| Method Summary | |
static boolean |
redirectStandardIO()
Deprecated. Causes standard input and output (including error) to be redirected using a standard java console window. |
static void |
redirectStandardIO(InputStream in,
OutputStream out)
Deprecated. Causes standard input and output (including error) to be redirected to the specified input and output streams. |
static void |
redirectStandardIO(InputStream in,
OutputStream out,
OutputStream err)
Deprecated. Causes standard input and output (including error) to be redirected to the specified input and output streams. |
static boolean |
redirectStandardIO(int howIn,
Object whereIn,
int howOut,
Object whereOut)
Deprecated. |
static boolean |
redirectStandardIO(int howIn,
Object whereIn,
int howOut,
Object whereOut,
int creatorOut,
int howErr,
Object whereErr,
int creatorErr)
Deprecated. Causes standard input and output (including error) to be redirected as specified. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int SYSTEM_IO
public static final int WINDOW_IO
public static final int NULL_IO
public static final int FILE_IO
public static final int FILE_APPEND_IO
public static final int UNICODE_FILE_IO
public static final int UNICODE_FILE_APPEND_IO
public static final int SAME_AS_STDOUT_IO
| Constructor Detail |
public Redirector()
| Method Detail |
public static void redirectStandardIO(InputStream in,
OutputStream out,
OutputStream err)
in - the InputStream from which standard input
is redirected.out - the OutputStream to which standard output
is sent from this point on.err - the OutputStream to which standard error is
sent from this point on.InputStream,
OutputStream
public static void redirectStandardIO(InputStream in,
OutputStream out)
in - the InputStream from which standard input
is redirected.out - the OutputStream to which standard output
and standard error are sent from this point on.InputStream,
OutputStreampublic static boolean redirectStandardIO()
public static boolean redirectStandardIO(int howIn,
Object whereIn,
int howOut,
Object whereOut)
public static boolean redirectStandardIO(int howIn,
Object whereIn,
int howOut,
Object whereOut,
int creatorOut,
int howErr,
Object whereErr,
int creatorErr)
FILE_IO is specified, a string is
given that corresponds to the file that is used for that source. Returns
an indication to the caller as to whether or not the redirection attempt
succeeded. A return value is used, instead of throwing an exception, to
minimize the risk that the caller (which is typically native code) will
not bother to check the exception...howIn - one of the redirection mode constants in this class,
indicating how standard input will be redirected.whereIn - if howIn is FILE_IO, then
this String is the name of the file from
which standard input will be taken. Ignored for other
values of howIn.howOut - one of the redirection mode constants in this class.
indicating how standard output will be redirected.whereOut - if howOut is FILE_IO, then
this String is the name of the file to
which standard output will be sent. Ignored for
other values of howOut.creatorOut - if howOut is FILE_IO, then
this int is the four-char-code that the stdout file
should have for its creator.howErr - one of the redirection mode constants in this class.
indicating how standard error will be redirected.whereErr - if howErr is FILE_IO, then
this String is the name of the file to
which standard error will be sent. Ignored for
other values of howErr.creatorErr - if howErr is FILE_IO, then
this int is the four-char-code that the stderr file
should have for its creator.SYSTEM_IO,
WINDOW_IO,
FILE_IO,
FILE_APPEND_IO,
NULL_IO
|
JavaTM 2 Platform Std. Ed. v1.3.1 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
Java, Java 2D, and JDBC are trademarks or registered trademarks of Sun Microsystems, Inc. in the US and other countries.
Copyright 1993-2001 Sun Microsystems, Inc. 901 San Antonio Road
Palo Alto, California, 94303, U.S.A. All Rights Reserved.