Interface ContentsComparator
- All Known Implementing Classes:
ClassfileComparator,DefaultContentsComparator,HtmlComparator,ManifestComparator,NestedZipComparator,PropertiesComparator,TextComparator,XmlComparator
public interface ContentsComparator
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intSystem property that controls the threshold size where a direct byte compare is performed (default 5 mb) -
Method Summary
Modifier and TypeMethodDescriptiongetDelta(ComparatorInputStream baseline, ComparatorInputStream reactor, ArtifactComparator.ComparisonData data) Computes the delta for the givenInputStreams, the streams passed will support mark/reset for repeated reads.booleanCheck if this comparator matches the given name or extension
-
Field Details
-
THRESHOLD
static final int THRESHOLDSystem property that controls the threshold size where a direct byte compare is performed (default 5 mb)
-
-
Method Details
-
getDelta
ArtifactDelta getDelta(ComparatorInputStream baseline, ComparatorInputStream reactor, ArtifactComparator.ComparisonData data) throws IOException Computes the delta for the givenInputStreams, the streams passed will support mark/reset for repeated reads.- Parameters:
baseline- the baseline datareactor- the reactor data or current project statedata-- Returns:
- the
ArtifactDeltaorArtifactDelta.NO_DIFFERENCEif the content is semantically the same - Throws:
IOException
-
matches
Check if this comparator matches the given name or extension- Parameters:
nameOrExtension- the extension or name to match- Returns:
trueif this comparator matches,falseotherwise
-