edu.rice.cs.util
Class OutputStreamRedirector
java.lang.Object
java.io.OutputStream
edu.rice.cs.util.OutputStreamRedirector
- All Implemented Interfaces:
- Closeable, Flushable
public abstract class OutputStreamRedirector
- extends OutputStream
Allows an output stream, such as System.out and System.err, to be redirected to another stream.
- Version:
- $Id: OutputStreamRedirector.java 4314 2008-01-30 00:08:33Z mgricken $
Method Summary |
abstract void |
print(String s)
Implement this method to print to the appropriate destination. |
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OutputStreamRedirector
public OutputStreamRedirector()
write
public final void write(int b)
- Specified by:
write
in class OutputStream
write
public final void write(byte[] b)
- Overrides:
write
in class OutputStream
write
public final void write(byte[] b,
int off,
int len)
- Overrides:
write
in class OutputStream
print
public abstract void print(String s)
- Implement this method to print to the appropriate destination.
- Parameters:
s
- The string to be printed to the new destination.