abbot.util
Class Tee

java.lang.Object
  extended by java.io.OutputStream
      extended by java.io.FilterOutputStream
          extended by java.io.PrintStream
              extended by abbot.util.Tee
All Implemented Interfaces:
Closeable, Flushable, Appendable

public class Tee
extends PrintStream

Splits a PrintStream into two targets. Useful for making a copy of stream go somewhere else, such as redirecting stdout/stderr to a file.


Field Summary
 
Fields inherited from class java.io.FilterOutputStream
out
 
Constructor Summary
Tee(PrintStream p1, PrintStream p2)
           
 
Method Summary
 void close()
           
 void flush()
           
 void print(boolean b)
           
 void print(char b)
           
 void print(char[] b)
           
 void print(double b)
           
 void print(float b)
           
 void print(int b)
           
 void print(long b)
           
 void print(Object b)
           
 void print(String b)
           
 void println()
           
 void println(boolean x)
           
 void println(byte[] x)
           
 void println(char x)
           
 void println(double x)
           
 void println(float x)
           
 void println(int x)
           
 void println(long x)
           
 void println(Object x)
           
 void println(String x)
           
 String toString()
           
 void write(byte[] b, int o, int l)
           
 void write(int b)
           
 
Methods inherited from class java.io.PrintStream
append, append, append, checkError, format, format, printf, printf, println, setError
 
Methods inherited from class java.io.FilterOutputStream
write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Tee

public Tee(PrintStream p1,
           PrintStream p2)
Method Detail

write

public void write(int b)
Overrides:
write in class PrintStream

write

public void write(byte[] b,
                  int o,
                  int l)
Overrides:
write in class PrintStream

flush

public void flush()
Specified by:
flush in interface Flushable
Overrides:
flush in class PrintStream

close

public void close()
Specified by:
close in interface Closeable
Overrides:
close in class PrintStream

print

public void print(boolean b)
Overrides:
print in class PrintStream

print

public void print(char b)
Overrides:
print in class PrintStream

print

public void print(int b)
Overrides:
print in class PrintStream

print

public void print(long b)
Overrides:
print in class PrintStream

print

public void print(float b)
Overrides:
print in class PrintStream

print

public void print(double b)
Overrides:
print in class PrintStream

print

public void print(char[] b)
Overrides:
print in class PrintStream

print

public void print(String b)
Overrides:
print in class PrintStream

print

public void print(Object b)
Overrides:
print in class PrintStream

println

public void println()
Overrides:
println in class PrintStream

println

public void println(boolean x)
Overrides:
println in class PrintStream

println

public void println(char x)
Overrides:
println in class PrintStream

println

public void println(int x)
Overrides:
println in class PrintStream

println

public void println(long x)
Overrides:
println in class PrintStream

println

public void println(float x)
Overrides:
println in class PrintStream

println

public void println(double x)
Overrides:
println in class PrintStream

println

public void println(byte[] x)

println

public void println(String x)
Overrides:
println in class PrintStream

println

public void println(Object x)
Overrides:
println in class PrintStream

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2002-2008 Timothy Wall. All Rights Reserved.
Abbot is hosted on

SourceForge