public class TeeOutputStream
extends java.io.FilterOutputStream
PrintWriter r = new PrintWriter(new TeeOutputStream(new FileOutputStream("file"), new File("otherfile")));
| Constructor and Description |
|---|
TeeOutputStream(java.io.OutputStream os,
java.io.File f)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
TeeOutputStream(java.io.OutputStream os,
java.io.File f,
boolean append)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
TeeOutputStream(java.io.OutputStream os,
java.io.OutputStream tos)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the other OuputStream.
|
TeeOutputStream(java.io.OutputStream os,
java.lang.String f)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
TeeOutputStream(java.io.OutputStream os,
java.lang.String f,
boolean append)
Create a new TeeOutputStream on the given OutputStream
and copy the stream to the given File.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
void |
finalize() |
void |
flush() |
void |
write(byte[] b) |
void |
write(byte[] b,
int off,
int len) |
void |
write(int b) |
public TeeOutputStream(java.io.OutputStream os,
java.io.OutputStream tos)
throws java.io.IOException
os - Writes to this OutputStreamtos - Write to this OutputStreamjava.io.IOExceptionpublic TeeOutputStream(java.io.OutputStream os,
java.io.File f,
boolean append)
throws java.io.IOException
os - Writes to this OutputStreamf - Write to this Fileappend - Append to file not overwritejava.io.IOExceptionpublic TeeOutputStream(java.io.OutputStream os,
java.io.File f)
throws java.io.IOException
os - Writes to this OutputStreamf - Write to this Filejava.io.IOExceptionpublic TeeOutputStream(java.io.OutputStream os,
java.lang.String f,
boolean append)
throws java.io.IOException
os - Writes to this OutputStreamf - Write to this Fileappend - Append to file not overwritejava.io.IOExceptionpublic TeeOutputStream(java.io.OutputStream os,
java.lang.String f)
throws java.io.IOException
os - Writes to this OutputStreamf - Write to this Filejava.io.IOExceptionpublic void close()
throws java.io.IOException
close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void flush()
throws java.io.IOException
flush in interface java.io.Flushableflush in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(int b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] b)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void write(byte[] b,
int off,
int len)
throws java.io.IOException
write in class java.io.FilterOutputStreamjava.io.IOExceptionpublic void finalize()
finalize in class java.lang.Object