|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.metastatic.rsync.ChecksumEncoder
The base class of objects that encode (externalize) checksum pairs to byte streams.
| Field Summary | |
|---|---|
protected Configuration |
config
The configuration object. |
protected OutputStream |
out
The output stream being written to. |
static String |
PROPERTY
Property prefix for checksum encoders. |
| Constructor Summary | |
|---|---|
ChecksumEncoder(Configuration config,
OutputStream out)
|
|
| Method Summary | |
|---|---|
abstract void |
doFinal()
Finishes encoding by emitting any end-of-checksums markers. |
static ChecksumEncoder |
getInstance(String encoding,
Configuration config,
OutputStream out)
Gets an instance of a checksum encoder for the specified encoding. |
abstract boolean |
requiresOrder()
This method returns true if the checksums must be
presented in order of ascending offset. |
abstract void |
write(ChecksumPair pair)
Encodes a checksum pair to the output stream. |
void |
write(List sums)
Encodes a list of checksums to the output 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 Configuration config
protected OutputStream out
| Constructor Detail |
public ChecksumEncoder(Configuration config,
OutputStream out)
| Method Detail |
public static ChecksumEncoder getInstance(String encoding,
Configuration config,
OutputStream out)
encoding - The encoding name.config - The configuration object.out - The output stream.
NullPointerException - If any parameter is null.
IllegalArgumentException - If the specified encoding cannot
be found, or if any of the arguments are inappropriate.
public void write(List sums)
throws IOException
sums - The sums to write.
IOException - If an I/O error occurs.
NullPointerException - If any element of the list is null.
IllegalArgumentException - If any element of the list is
not a ChecksumPair.
public abstract void write(ChecksumPair pair)
throws IOException
pair - The pair to write.
IOException - If an I/O error occurs.
public abstract void doFinal()
throws IOException
IOException - If an I/O error occurs.public abstract boolean requiresOrder()
true if the checksums must be
presented in order of ascending offset.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||