Closeable, AutoCloseablepublic class TeeInputStream extends FilterInputStream
Reader r = new InputStreamReader(new TeeInputStream(new FileInputStream("file"), new File("otherfile")));
| Constructor | Description |
|---|---|
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.
|
| Modifier and Type | Method | Description |
|---|---|---|
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) |
readAllBytes, readNBytes, transferTopublic TeeInputStream(InputStream is, OutputStream tos) throws IOException
is - Reads from this InputStreamtos - Write to this OutputStreamIOExceptionpublic TeeInputStream(InputStream is, File f, boolean append) throws IOException
is - Reads from this InputStreamf - Write to this Fileappend - Append to file not overwriteIOExceptionpublic TeeInputStream(InputStream is, File f) throws IOException
is - Reads from this InputStreamf - Write to this FileIOExceptionpublic TeeInputStream(InputStream is, String f, boolean append) throws IOException
is - Reads from this InputStreamf - Write to this Fileappend - Append to file not overwriteIOExceptionpublic TeeInputStream(InputStream is, String f) throws IOException
is - Reads from this InputStreamf - Write to this FileIOExceptionpublic void close()
throws IOException
close in interface AutoCloseableclose in interface Closeableclose in class FilterInputStreamIOExceptionpublic void flush()
throws IOException
IOExceptionpublic int available()
throws IOException
available in class FilterInputStreamIOExceptionpublic int read()
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b)
throws IOException
read in class FilterInputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class FilterInputStreamIOExceptionpublic long skip(long n)
throws IOException
skip in class FilterInputStreamIOExceptionpublic void mark(int readlimit)
mark in class FilterInputStreampublic boolean markSupported()
markSupported in class FilterInputStreampublic void reset()
throws IOException
reset in class FilterInputStreamIOException