public class TeeInputStream extends FilterInputStream
Reader r = new InputStreamReader(new TeeInputStream(new FileInputStream("file"), new File("otherfile")));
| Modifier and Type | Field and Description |
|---|---|
private OutputStream |
fos |
private InputStream |
in |
| Constructor and 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.
|
private InputStream in
private OutputStream fos
public 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 Closeableclose in interface AutoCloseableclose 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 FilterInputStreamIOExceptionCopyright © 2015. All Rights Reserved.