public abstract class DynamicInputStream extends InputStream
writeMoreData()
method.Constructor and Description |
---|
DynamicInputStream() |
Modifier and Type | Method and Description |
---|---|
protected OutputStream |
getOutputStream()
Returns the
OutputStream that should be used when writing data. |
int |
read() |
int |
read(byte[] b,
int off,
int len) |
protected abstract boolean |
writeMoreData()
Called when more data should be written to the
output stream . |
available, close, mark, markSupported, read, reset, skip
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] b, int off, int len) throws IOException
read
in class InputStream
IOException
protected final OutputStream getOutputStream()
OutputStream
that should be used when writing
data. The output
stream instance will not change during the life of the object and so can be used as the source to a a
FilterInputStream
. This is an in-memory stream so care should be taken to not write large amounts of
data.writeMoreData()
protected abstract boolean writeMoreData() throws IOException
output stream
. This method can be
called many times, implementations should write zero or more bytes to output stream
on
each call. Generally it is recommended that not more that 4096 bytes are written in a single call.IOException
Copyright © 2014. All rights reserved.