|
|||||||||
| 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(InputStream is,
File f)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(InputStream is,
File f,
boolean append)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(InputStream is,
OutputStream tos)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(InputStream is,
String f)
Create a new TeeInputStream on the given InputStream and copy the stream to the given File. |
|
TeeInputStream(InputStream is,
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(InputStream is,
OutputStream tos)
throws IOException
is - Reads from this InputStreamtos - Write to this OutputStream
IOException
public TeeInputStream(InputStream is,
File f,
boolean append)
throws IOException
is - Reads from this InputStreamf - Write to this Fileappend - Append to file not overwrite
IOException
public TeeInputStream(InputStream is,
File f)
throws IOException
is - Reads from this InputStreamf - Write to this File
IOException
public TeeInputStream(InputStream is,
String f,
boolean append)
throws IOException
is - Reads from this InputStreamf - Write to this Fileappend - Append to file not overwrite
IOException
public TeeInputStream(InputStream is,
String f)
throws IOException
is - Reads from this InputStreamf - Write to this File
IOException| Method Detail |
|---|
public void close()
throws IOException
close in interface Closeableclose in class FilterInputStreamIOException
public void flush()
throws IOException
IOException
public int available()
throws IOException
available in class FilterInputStreamIOException
public int read()
throws IOException
read in class FilterInputStreamIOException
public int read(byte[] b)
throws IOException
read in class FilterInputStreamIOException
public int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOException
public long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreampublic boolean markSupported()
markSupported in class FilterInputStream
public void reset()
throws IOException
reset in class FilterInputStreamIOExceptionpublic void finalize()
finalize in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||