|
TrueUpdate Core 0.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnet.java.trueupdate.core.zip.model.DiffModel
@Immutable public final class DiffModel
A Value Object which represents the meta data in a ZIP patch 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 |
DiffModel.Builder
A builder for a diff model. |
| Field Summary | |
|---|---|
static String |
ENTRY_NAME
The name of the entry which contains the marshalled diff model in a ZIP patch 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 DiffModel.Builder |
builder()
Returns a new builder for a diff 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 DiffModel |
decodeFromXml(Source source)
Decodes a diff 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 diff 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 DiffModel.Builder builder()
public EntryNameAndTwoDigests changed(String name)
public Collection<EntryNameAndTwoDigests> changedEntries()
public static DiffModel 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 diff 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.4 | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||