|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.metastatic.rsync.DeltaDecoder
The superclass of all classes that decode delta objects from an external, binary format.
Subclasses MAY define themselves to be accessable through the
#getInstance(java.lang.String,java.io.InputStream) method
by providing a one-argument constructor that accepts an InputStream and defining the system property
"jarsync.deltaDecoder.encoding-name".
| Field Summary | |
|---|---|
protected Configuration |
config
The configuration. |
protected InputStream |
in
The underlying input stream. |
static String |
PROPERTY
|
| Constructor Summary | |
|---|---|
DeltaDecoder(Configuration config,
InputStream in)
|
|
| Method Summary | |
|---|---|
static DeltaDecoder |
getInstance(String encoding,
Configuration config,
InputStream in)
Returns a new instance of the specified decoder. |
abstract Delta |
read()
Read (decode) a single delta from the input stream. |
int |
read(List deltas)
Read (decode) a list of deltas from the input stream. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final String PROPERTY
protected final Configuration config
protected final InputStream in
| Constructor Detail |
public DeltaDecoder(Configuration config,
InputStream in)
| Method Detail |
public static final DeltaDecoder getInstance(String encoding,
Configuration config,
InputStream in)
encoding - The name of the decoder to get.config - The configuration to use.in - The source of binary data.
NullPointerException - If any parameter is null.
IllegalArgumentException - If there is no appropriate
decoder available.
public int read(List deltas)
throws IOException
deltas - The list of deltas to write.
IOException - If an I/O error occurs.
IllegalArgumentException - If any element of the list is not
a Delta.
NullPointerException - If any element is null.
public abstract Delta read()
throws IOException
If this encoding provides an end-of-deltas marker, then this method
is required to return null upon receiving this marker.
null
IOException - If an I/O error occurs.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||