@API(type=NOT_EXTENDABLE,
src=PUBLIC)
public interface DifferencePerformer
DifferencePerformer
is used to compare two resources of a given content type using
a set of options. The result of the diff is a list with the differences between the resources.Modifier and Type | Method and Description |
---|---|
java.util.List<Difference> |
performDiff(java.io.Reader leftContentReader,
java.io.Reader rightContentReader,
java.lang.String leftSystemId,
java.lang.String rightSystemId,
java.lang.String contentType,
DiffOptions diffOptions,
DiffProgressListener diffProgressListener)
Performs the diff operation between the resources represented by the two readers.
|
void |
stop()
Signal to the diff performer that it must stop.
|
java.util.List<Difference> performDiff(java.io.Reader leftContentReader, java.io.Reader rightContentReader, java.lang.String leftSystemId, java.lang.String rightSystemId, java.lang.String contentType, DiffOptions diffOptions, DiffProgressListener diffProgressListener) throws DiffException
\n
.leftContentReader
- The first resource content reader.
It cannot be null
.rightContentReader
- The second resource content reader.
It cannot be null
.leftSystemId
- The left resource URL as string.
It can be null
when a system ID is not relevant.rightSystemId
- The right resource URL as string.
It can be null
when a system ID is not relevant.contentType
- The content type of the two resources, constants from DiffContentTypes
.
It is used only when the diff algorithm takes into account the
tokens of the language associated with the resources.
It can be null
when the used algorithm is not syntax aware.diffOptions
- The options used by the diff performer to perform the comparison.
It can be null
meaning a default set of options wil be used.diffProgressListener
- The DiffProgressListener
notified about the progress of the diff.
It can be null
when the diff progress doesn't need to be monitored.Difference
objects.
If the resources are identical or the diff fails the list will be empty.DiffException
- If the diff operation fails or it is stopped before it finishes.void stop()
© Copyright SyncRO Soft SRL 2002 - 2016. All rights reserved.