|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.OutputStream
java.io.FilterOutputStream
cx.ath.matthew.io.TeeOutputStream
public class TeeOutputStream
Class to copy a stream to another stream or file as it is being sent through a stream pipe E.g.
PrintWriter r = new PrintWriter(new TeeOutputStream(new FileOutputStream("file"), new File("otherfile")));
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
void |
close()
|
void |
finalize()
|
void |
flush()
|
void |
write(byte[] b)
|
void |
write(byte[] b,
int off,
int len)
|
void |
write(int b)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TeeOutputStream(OutputStream os, OutputStream tos) throws IOException
os
- Writes to this OutputStreamtos
- Write to this OutputStream
IOException
public TeeOutputStream(OutputStream os, File f, boolean append) throws IOException
os
- Writes to this OutputStreamf
- Write to this Fileappend
- Append to file not overwrite
IOException
public TeeOutputStream(OutputStream os, File f) throws IOException
os
- Writes to this OutputStreamf
- Write to this File
IOException
public TeeOutputStream(OutputStream os, String f, boolean append) throws IOException
os
- Writes to this OutputStreamf
- Write to this Fileappend
- Append to file not overwrite
IOException
public TeeOutputStream(OutputStream os, String f) throws IOException
os
- Writes to this OutputStreamf
- Write to this File
IOException
Method Detail |
---|
public void close() throws IOException
close
in interface Closeable
close
in class FilterOutputStream
IOException
public void flush() throws IOException
flush
in interface Flushable
flush
in class FilterOutputStream
IOException
public void write(int b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b) throws IOException
write
in class FilterOutputStream
IOException
public void write(byte[] b, int off, int len) throws IOException
write
in class FilterOutputStream
IOException
public void finalize()
finalize
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |