|
|||||||||
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(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. |
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(java.io.OutputStream os, java.io.OutputStream tos) throws java.io.IOException
os
- Writes to this OutputStreamtos
- Write to this OutputStream
java.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 overwrite
java.io.IOException
public TeeOutputStream(java.io.OutputStream os, java.io.File f) throws java.io.IOException
os
- Writes to this OutputStreamf
- Write to this File
java.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 overwrite
java.io.IOException
public TeeOutputStream(java.io.OutputStream os, java.lang.String f) throws java.io.IOException
os
- Writes to this OutputStreamf
- Write to this File
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface java.io.Closeable
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |