|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.metastatic.rsync.ChecksumDecoder
The base class of objects that decode (internalize) checksum pairs from byte streams.
Field Summary | |
---|---|
protected Configuration |
config
The configuration object. |
protected InputStream |
in
The input stream being read from. |
static String |
PROPERTY
Property prefix for checksum encoders. |
Constructor Summary | |
---|---|
ChecksumDecoder(Configuration config,
InputStream in)
|
Method Summary | |
---|---|
static ChecksumEncoder |
getInstance(String encoding,
Configuration config,
InputStream in)
Gets an instance of a checksum decoder for the specified encoding. |
abstract ChecksumPair |
read()
Decodes a checksum pair from the input stream. |
int |
read(List sums)
Decodes checksums from the stream, storing them into the specified list, until the end of checksums is encountered. |
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 Configuration config
protected InputStream in
Constructor Detail |
public ChecksumDecoder(Configuration config, InputStream in)
Method Detail |
public static ChecksumEncoder getInstance(String encoding, Configuration config, InputStream in)
encoding
- The encoding name.config
- The configuration object.in
- The input stream.
NullPointerException
- If any parameter is null.
IllegalArgumentException
- If the specified encoding cannot
be found, or if any of the arguments are inappropriate.public int read(List sums) throws IOException
sums
- The list to store the sums into.
IOException
- If an I/O error occurs.
NullPointerException
- If any element of the list is null.public abstract ChecksumPair read() throws IOException
IOException
- If an I/O error occurs.
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |