edu.vt.middleware.crypt.io
Class TeePrintStream
java.lang.Object
java.io.OutputStream
java.io.FilterOutputStream
java.io.PrintStream
edu.vt.middleware.crypt.io.TeePrintStream
- All Implemented Interfaces:
- Closeable, Flushable, Appendable
public class TeePrintStream
- extends PrintStream
Works like the Unix tee utility by writing to two streams
simultaneously, where one is typically STDOUT or STDERR.
- Version:
- $Revision: 3 $
- Author:
- Middleware Services
|
Method Summary |
void |
flush()
|
void |
write(byte[] buf,
int off,
int len)
|
void |
write(int b)
|
| Methods inherited from class java.io.PrintStream |
append, append, append, checkError, clearError, close, format, format, print, print, print, print, print, print, print, print, print, printf, printf, println, println, println, println, println, println, println, println, println, println, setError |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
TeePrintStream
public TeePrintStream(OutputStream out1,
OutputStream out2)
- Creates a tee stream that writes to both of the given streams
simultaneously. To operate like the Unix
tee, the second
stream should be STDOUT or STDERR.
- Parameters:
out1 - Primary output stream.out2 - Secondary output stream, usually System.out or
System.err.
write
public void write(int b)
-
- Overrides:
write in class PrintStream
write
public void write(byte[] buf,
int off,
int len)
-
- Overrides:
write in class PrintStream
flush
public void flush()
-
- Specified by:
flush in interface Flushable- Overrides:
flush in class PrintStream
Copyright © 2003-2011 Virginia Tech. All Rights Reserved.