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.
|
public TeeOutputStream(java.io.OutputStream os, java.io.OutputStream tos) throws java.io.IOException
os
- Writes to this OutputStreamtos
- Write to this OutputStreamjava.io.IOException
public 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.IOException
public TeeOutputStream(java.io.OutputStream os, java.io.File f) throws java.io.IOException
os
- Writes to this OutputStreamf
- Write to this Filejava.io.IOException
public 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.IOException
public TeeOutputStream(java.io.OutputStream os, java.lang.String f) throws java.io.IOException
os
- Writes to this OutputStreamf
- Write to this Filejava.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
close
in class java.io.FilterOutputStream
java.io.IOException
public void flush() throws java.io.IOException
flush
in interface java.io.Flushable
flush
in class java.io.FilterOutputStream
java.io.IOException
public void write(int b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] b) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void write(byte[] b, int off, int len) throws java.io.IOException
write
in class java.io.FilterOutputStream
java.io.IOException
public void finalize()
finalize
in class java.lang.Object