JavaTM 2 Platform
Std. Ed. v1.3.1

com.apple.mrj.console
Class Redirector

java.lang.Object
  |
  +--com.apple.mrj.console.Redirector

Deprecated. As of MacOSX 10.2

public class Redirector
extends Object

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.

Since:
MRJ 2.1
See Also:
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

SYSTEM_IO

public static final int SYSTEM_IO
Deprecated. 
Specified that the given redirection go to stdout/stderr or from stdin

WINDOW_IO

public static final int WINDOW_IO
Deprecated. 
Specified that the given redirection go to, or come from, a window.

NULL_IO

public static final int NULL_IO
Deprecated. 
Specified that the given redirection go to, or come from, nowhere. For input, this will be a never-ending source of end-of-file returns, whereas for output it will be a place to throw bytes into a void.

FILE_IO

public static final int FILE_IO
Deprecated. 
Specified that the given redirection go to, or come from, a file.

FILE_APPEND_IO

public static final int FILE_APPEND_IO
Deprecated. 
Specified that the given redirection append to a file.

UNICODE_FILE_IO

public static final int UNICODE_FILE_IO
Deprecated. 
Specified that the given redirection go to, or come from, a unicode file.

UNICODE_FILE_APPEND_IO

public static final int UNICODE_FILE_APPEND_IO
Deprecated. 
Specified that the given redirection append to a unicode file.

SAME_AS_STDOUT_IO

public static final int SAME_AS_STDOUT_IO
Deprecated. 
Specified that the given redirection (stderr) should go where ever stdout goes
Constructor Detail

Redirector

public Redirector()
Deprecated. 
Method Detail

redirectStandardIO

public 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.
Parameters:
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.
See Also:
InputStream, OutputStream

redirectStandardIO

public 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.
Parameters:
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.
See Also:
InputStream, OutputStream

redirectStandardIO

public static boolean redirectStandardIO()
Deprecated. 
Causes standard input and output (including error) to be redirected using a standard java console window.
Returns:
an indication of whether or not the redirection attempt succeeded.

redirectStandardIO

public static boolean redirectStandardIO(int howIn,
                                         Object whereIn,
                                         int howOut,
                                         Object whereOut)
Deprecated. 

redirectStandardIO

public 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. For each of input and output, one of the source enumerations are specified, and if 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...
Parameters:
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.
Returns:
an indication of whether or not the redirection attempt succeeded.
See Also:
SYSTEM_IO, WINDOW_IO, FILE_IO, FILE_APPEND_IO, NULL_IO

JavaTM 2 Platform
Std. Ed. v1.3.1

Submit a bug or feature
For further API reference and developer documentation, see Java 2 SDK SE Developer Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.

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.