|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.io.InputStream
java.io.FilterInputStream
cx.ath.matthew.io.TeeInputStream
public class TeeInputStream
Class to copy a stream to a file or another stream as it is being sent through a stream pipe E.g.
Reader r = new InputStreamReader(new TeeInputStream(new FileInputStream("file"), new File("otherfile")));
Constructor Summary | |
---|---|
TeeInputStream(java.io.InputStream is,
java.io.File f)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(java.io.InputStream is,
java.io.File f,
boolean append)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(java.io.InputStream is,
java.io.OutputStream tos)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(java.io.InputStream is,
java.lang.String f)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(java.io.InputStream is,
java.lang.String f,
boolean append)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
Method Summary | |
---|---|
int |
available()
|
void |
close()
|
void |
finalize()
|
void |
flush()
|
void |
mark(int readlimit)
|
boolean |
markSupported()
|
int |
read()
|
int |
read(byte[] b)
|
int |
read(byte[] b,
int off,
int len)
|
void |
reset()
|
long |
skip(long n)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TeeInputStream(java.io.InputStream is, java.io.OutputStream tos) throws java.io.IOException
is
- Reads from this InputStreamtos
- Write to this OutputStream
java.io.IOException
public TeeInputStream(java.io.InputStream is, java.io.File f, boolean append) throws java.io.IOException
is
- Reads from this InputStreamf
- Write to this Fileappend
- Append to file not overwrite
java.io.IOException
public TeeInputStream(java.io.InputStream is, java.io.File f) throws java.io.IOException
is
- Reads from this InputStreamf
- Write to this File
java.io.IOException
public TeeInputStream(java.io.InputStream is, java.lang.String f, boolean append) throws java.io.IOException
is
- Reads from this InputStreamf
- Write to this Fileappend
- Append to file not overwrite
java.io.IOException
public TeeInputStream(java.io.InputStream is, java.lang.String f) throws java.io.IOException
is
- Reads from this InputStreamf
- 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.FilterInputStream
java.io.IOException
public void flush() throws java.io.IOException
java.io.IOException
public int available() throws java.io.IOException
available
in class java.io.FilterInputStream
java.io.IOException
public int read() throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public int read(byte[] b, int off, int len) throws java.io.IOException
read
in class java.io.FilterInputStream
java.io.IOException
public long skip(long n) throws java.io.IOException
skip
in class java.io.FilterInputStream
java.io.IOException
public void mark(int readlimit)
mark
in class java.io.FilterInputStream
public boolean markSupported()
markSupported
in class java.io.FilterInputStream
public void reset() throws java.io.IOException
reset
in class java.io.FilterInputStream
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 |