public class LazyInputStream extends InputStream
InputStream, deferring
the interactions until needed.
This other stream is provided as needed by an LazyInputStream.InputStreamProvider so
that the underlying stream is not eagerly loaded.
| Modifier and Type | Class and Description |
|---|---|
static interface |
LazyInputStream.InputStreamProvider
An interface to be implemented by clients that wish to utilize
LazyInputStreams. |
| Constructor and Description |
|---|
LazyInputStream(LazyInputStream.InputStreamProvider provider)
Construct a new lazy stream based off the given provider.
|
public LazyInputStream(LazyInputStream.InputStreamProvider provider)
provider - the input stream provider. Must not be null.public void close() throws IOException
close in interface Closeableclose in interface AutoCloseableclose in class InputStreamIOExceptionpublic int available() throws IOException
available in class InputStreamIOExceptionpublic void mark(int readlimit)
mark in class InputStreampublic boolean markSupported()
markSupported in class InputStreampublic int read() throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b, int off, int len) throws IOException
read in class InputStreamIOExceptionpublic int read(byte[] b) throws IOException
read in class InputStreamIOExceptionpublic long skip(long n) throws IOException
skip in class InputStreamIOExceptionpublic void reset() throws IOException
reset in class InputStreamIOExceptionCopyright © 2010–2014 The Apache Software Foundation. All rights reserved.