diff package implements
the differencing engine that JRCS uses. The engine has the power
of Unix diff, is simple to understand, and can be used
independently of the archive handling functionality. The entry
point to the differencing engine is class
Text is represented as
Object because the diff
engine is capable of handling more than plain ASCII. In fact,
arrays of any type that implements
equals() correctly can be subject to
differencing using this library.
is an implementation of Gene Myers
differencing algorithm. Myers' algorithm produces optimum
results (minimum diffs), but consumes considerable amount of
memory, it may not be suitable for very large files.
Interface Summary Interface Description DiffAlgorithmA simple interface for implementations of differencing algorithms. RevisionVisitorDefinition of a Visitor interface for
RevisionsSee "Design Patterns" by the Gang of Four
Class Summary Class Description AddDeltaHolds an add-delta between to revisions of a text. ChangeDeltaHolds an change-delta between to revisions of a text. ChunkHolds a information about a part of the text involved in a differencing or patching operation. DeleteDeltaHolds a delete-delta between to revisions of a text. DeltaHolds a "delta" difference between to revisions of a text. DiffImplements a differencing engine that works on arrays of
RevisionA Revision holds the series of deltas that describe the differences between two sequences. ToStringThis class delegates handling of the to a StringBuilder based version.
Exception Summary Exception Description DifferentiationFailedExceptionThrown whenever the differencing engine cannot produce the differences between two revisions of ta text. DiffExceptionBase class for all exceptions emanating from this package. PatchFailedExceptionThrown whenever a delta cannot be applied as a patch to a given text.