Closeable, AutoCloseablepublic 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 | Description |
|---|---|
TeeInputStream(InputStream src,
OutputStream dst) |
Initialize a tee input stream.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
close() |
|
int |
read() |
|
int |
read(byte[] b,
int off,
int len) |
|
long |
skip(long count) |
available, mark, markSupported, read, readAllBytes, readNBytes, reset, transferTopublic 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 AutoCloseableclose in interface Closeableclose in class InputStreamIOExceptionCopyright © 2018. All rights reserved.