public class TeeOutputStream extends FilterOutputStream
PrintWriter r = new PrintWriter(new TeeOutputStream(new FileOutputStream("file"), new File("otherfile")));
| Modifier and Type | Field and Description |
|---|---|
private File |
f |
private OutputStream |
fos |
private OutputStream |
out |
| Constructor and Description |
|---|
TeeOutputStream(OutputStream os,
File f)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
TeeOutputStream(OutputStream os,
File f,
boolean append)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
TeeOutputStream(OutputStream os,
OutputStream tos)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the other OuputStream.
|
TeeOutputStream(OutputStream os,
String f)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
TeeOutputStream(OutputStream os,
String f,
boolean append)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
private File f
private OutputStream out
private OutputStream fos
public TeeOutputStream(OutputStream os, OutputStream tos) throws IOException
os - Writes to this OutputStreamtos - Write to this OutputStreamIOExceptionpublic TeeOutputStream(OutputStream os, File f, boolean append) throws IOException
os - Writes to this OutputStreamf - Write to this Fileappend - Append to file not overwriteIOExceptionpublic TeeOutputStream(OutputStream os, File f) throws IOException
os - Writes to this OutputStreamf - Write to this FileIOExceptionpublic TeeOutputStream(OutputStream os, String f, boolean append) throws IOException
os - Writes to this OutputStreamf - Write to this Fileappend - Append to file not overwriteIOExceptionpublic TeeOutputStream(OutputStream os, String f) throws IOException
os - Writes to this OutputStreamf - Write to this FileIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class FilterOutputStreamIOExceptionpublic void flush()
throws IOException
flush in interface Flushableflush in class FilterOutputStreamIOExceptionpublic void write(int b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(byte[] b)
throws IOException
write in class FilterOutputStreamIOExceptionpublic void write(byte[] b,
int off,
int len)
throws IOException
write in class FilterOutputStreamIOExceptionCopyright © 2015. All Rights Reserved.