Maven module :un.storage : archive-xz :
Class : un.storage.archive.xz.DeltaInputStream
Extends/Implements : java.io.InputStream
Subclasses : -

Decodes raw Delta-filtered data (no XZ headers).


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.



Variables : DISTANCE_MIN, DISTANCE_MAX
Functions : DeltaInputStream, read, read, available, close



Smallest supported delta calculation distance.
public int DISTANCE_MIN


Largest supported delta calculation distance.
public int DISTANCE_MAX



Creates a new Delta decoder with the given delta calculation distance.

@param in input stream from which Delta filtered data
is read

@param distance delta calculation distance, must be in the
range [DISTANCE_MIN,
DISTANCE_MAX]
public void DeltaInputStream (InputStream in, int distance)


Decode the next byte from this input stream.
return   the next decoded byte, or -1 to indicate
the end of input on the input stream in
throws   IOException may be thrown by in
public int read ()


Decode into an array of bytes.


This calls in.read(buf, off, len) and defilters the
returned data.

@param buf target buffer for decoded data
@param off start offset in buf
@param len maximum number of bytes to read

@return number of bytes read, or -1 to indicate
the end of the input stream in

@throws XZIOException if the stream has been closed

@throws IOException may be thrown by underlaying input
stream in

public int read (byte[] buf, int off, int len)


Calls in.available().
return   the value returned by in.available()
public int available ()


Closes the stream and calls in.close().
If the stream was already closed, this does nothing.
throws   IOException if thrown by in.close()
public void close ()