public class TeeInputStream extends InputStream
TemporaryBuffer, where any
data read or skipped by the caller is also duplicated into the temporary
buffer. Later the temporary buffer can then be used instead of the original
source stream.
During close this stream copies any remaining data from the source stream
into the destination stream.| Constructor and Description |
|---|
TeeInputStream(InputStream src,
OutputStream dst)
Initialize a tee input stream.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
long |
skip(long count) |
available, mark, markSupported, read, resetpublic TeeInputStream(InputStream src, OutputStream dst)
src - source stream to consume.dst - destination to copy the source to as it is consumed. Typically
this is a TemporaryBuffer.public int read()
throws IOException
read in class InputStreamIOExceptionpublic long skip(long count)
throws IOException
skip in class InputStreamIOExceptionpublic int read(byte[] b,
int off,
int len)
throws IOException
read in class InputStreamIOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionCopyright © 2014. All rights reserved.