edu.rice.cs.util
Class OutputStreamRedirector

java.lang.Object
  extended by java.io.OutputStream
      extended by 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 $

Constructor Summary
OutputStreamRedirector()
           
 
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.io.OutputStream
close, flush
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

OutputStreamRedirector

public OutputStreamRedirector()
Method Detail

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.