public class DeltaInputStream
extends java.io.InputStream
The delta filter doesn't change the size of the data and thus it cannot have an end-of-payload marker. It will simply decode until its input stream indicates end of input.
| Modifier and Type | Field and Description |
|---|---|
static int |
DISTANCE_MAX
Largest supported delta calculation distance.
|
static int |
DISTANCE_MIN
Smallest supported delta calculation distance.
|
| Constructor and Description |
|---|
DeltaInputStream(java.io.InputStream in,
int distance)
Creates a new Delta decoder with the given delta calculation distance.
|
public static final int DISTANCE_MIN
public static final int DISTANCE_MAX
public DeltaInputStream(java.io.InputStream in,
int distance)
in - input stream from which Delta filtered data
is readdistance - delta calculation distance, must be in the
range [DISTANCE_MIN,
DISTANCE_MAX]public int read()
throws java.io.IOException
read in class java.io.InputStream-1 to indicate
the end of input on the input stream injava.io.IOException - may be thrown by inpublic int read(byte[] buf,
int off,
int len)
throws java.io.IOException
This calls in.read(buf, off, len) and defilters the
returned data.
read in class java.io.InputStreambuf - target buffer for decoded dataoff - start offset in buflen - maximum number of bytes to read-1 to indicate
the end of the input stream inXZIOException - if the stream has been closedjava.io.IOException - may be thrown by underlaying input
stream inpublic int available()
throws java.io.IOException
in.available().available in class java.io.InputStreamin.available()java.io.IOExceptionpublic void close()
throws java.io.IOException
in.close().
If the stream was already closed, this does nothing.close in interface java.io.Closeableclose in interface java.lang.AutoCloseableclose in class java.io.InputStreamjava.io.IOException - if thrown by in.close()