|
TrueUpdate Core 0.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.trueupdate.core.zip.model.DeltaModel
@Immutable public final class DeltaModel
A Value Object which represents the meta data in a delta ZIP file. It encapsulates unmodifiable collections of changed, unchanged, added and removed entry names and message digests in canonical string notation, attributed with the message digest algorithm name and byte length.
| Nested Class Summary | |
|---|---|
static class |
DeltaModel.Builder
A builder for a delta model. |
| Field Summary | |
|---|---|
static String |
ENTRY_NAME
The name of the entry which contains the marshalled delta model in a delta ZIP file. |
| Method Summary | |
|---|---|
EntryNameAndDigest |
added(String name)
Looks up the given entry name in the added entries. |
Collection<EntryNameAndDigest> |
addedEntries()
Returns a collection of the entry name and message digest for the added entries. |
static DeltaModel.Builder |
builder()
Returns a new builder for a delta model. |
EntryNameAndTwoDigests |
changed(String name)
Looks up the given entry name in the changed entries. |
Collection<EntryNameAndTwoDigests> |
changedEntries()
Returns a collection of the entry name and two message digests for the changed entries. |
static DeltaModel |
decodeFromXml(Source source)
Decodes a delta model from XML. |
String |
digestAlgorithmName()
Returns the message digest algorithm name. |
Integer |
digestByteLength()
Returns the message digest byte length. |
void |
encodeToXml(Sink sink)
Encodes this delta model to XML. |
boolean |
equals(Object obj)
|
int |
hashCode()
|
static JAXBContext |
jaxbContext()
Returns a JAXB context which binds only this class. |
EntryNameAndDigest |
removed(String name)
Deprecated. |
Collection<EntryNameAndDigest> |
removedEntries()
Returns a collection of the entry name and message digest for the removed entries. |
EntryNameAndDigest |
unchanged(String name)
Deprecated. |
Collection<EntryNameAndDigest> |
unchangedEntries()
Returns a collection of the entry name and message digest for the unchanged entries. |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String ENTRY_NAME
| Method Detail |
|---|
public EntryNameAndDigest added(String name)
public Collection<EntryNameAndDigest> addedEntries()
public static DeltaModel.Builder builder()
public EntryNameAndTwoDigests changed(String name)
public Collection<EntryNameAndTwoDigests> changedEntries()
public static DeltaModel decodeFromXml(Source source)
throws Exception
source - the source for reading the XML.
Exception - at the discretion of the JAXB codec, e.g. if the
source isn't readable.public String digestAlgorithmName()
@Nullable public Integer digestByteLength()
null if and only if the byte length of the message
digest used to build this delta model is the default value for the
algorithm.
public void encodeToXml(Sink sink)
throws Exception
sink - the sink for writing the XML.
Exception - at the discretion of the JAXB codec, e.g. if the
sink isn't writable.public boolean equals(Object obj)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic static JAXBContext jaxbContext()
@Deprecated public EntryNameAndDigest removed(String name)
public Collection<EntryNameAndDigest> removedEntries()
@Deprecated public EntryNameAndDigest unchanged(String name)
public Collection<EntryNameAndDigest> unchangedEntries()
|
TrueUpdate Core 0.5 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||