public class Comparer extends Object implements com.aspose.ms.System.IDisposable
Represents main class that controls the documents comparison process.
Constructor and Description |
---|
Comparer(ComparerSettings settings) |
Comparer(InputStream document)
Initializes new instance of
Comparer class with source document stream. |
Comparer(InputStream document,
ComparerSettings settings)
Initializes new instance of
Comparer class with source document stream and ComparerSettings . |
Comparer(InputStream document,
LoadOptions loadOptions)
Initializes new instance of
Comparer with source document stream and LoadOptions . |
Comparer(InputStream document,
LoadOptions loadOptions,
ComparerSettings settings)
|
Comparer(String filePath)
Initializes new instance of
Comparer class with source file path. |
Comparer(String filePath,
ComparerSettings settings)
Initializes new instance of
Comparer class with source file path and ComparerSettings . |
Comparer(String filePath,
LoadOptions loadOptions)
Initializes new instance of
Comparer with source file path and LoadOptions . |
Comparer(String filePath,
LoadOptions loadOptions,
ComparerSettings settings)
|
Modifier and Type | Method and Description |
---|---|
void |
add(InputStream... documents)
Adds document stream to comparison.
|
void |
add(InputStream document)
Adds document stream to comparison.
|
void |
add(InputStream document,
LoadOptions loadOptions)
Adds document stream to comparison with loading options specified.
|
void |
add(String... filePaths)
Adds file to comparison.
|
void |
add(String filePath)
Adds file to comparison.
|
void |
add(String filePath,
LoadOptions loadOptions)
Adds file to comparison with loading options specified.
|
void |
applyChanges(OutputStream document,
ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
|
void |
applyChanges(OutputStream document,
SaveOptions saveOptions,
ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
|
void |
applyChanges(String filePath,
ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
|
void |
applyChanges(String filePath,
SaveOptions saveOptions,
ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
|
void |
compare()
Compares documents without saving result with default options
|
void |
compare(CompareOptions compareOptions)
Compares documents without saving result.
|
void |
compare(OutputStream document)
Compares documents and saves result to file stream
|
void |
compare(OutputStream document,
CompareOptions compareOptions)
Compares documents and saves result to file stream
|
void |
compare(OutputStream document,
SaveOptions saveOptions)
Compares documents and save result to file stream
|
void |
compare(OutputStream document,
SaveOptions saveOptions,
CompareOptions compareOptions)
Compares documents and saves result to a stream.
|
void |
compare(SaveOptions saveOptions,
CompareOptions compareOptions)
Compares documents without saving result.
|
void |
compare(String filePath)
Compares documents and saves result to file path
|
void |
compare(String filePath,
CompareOptions compareOptions)
Compares documents and saves result to file path
|
void |
compare(String filePath,
SaveOptions saveOptions)
Compares documents and save result to file path
|
void |
compare(String filePath,
SaveOptions saveOptions,
CompareOptions compareOptions)
Compares documents and saves result to file path
|
void |
dispose()
Releases resources.
|
ChangeInfo[] |
getChanges()
Gets list of changes between source and target file(s).
|
ChangeInfo[] |
getChanges(GetChangeOptions getChangeOptions)
Gets list of changes between source and target file(s).
|
Document |
getSource()
Source file that is being compared.
|
List<Document> |
getTargets()
List of target files to compare with source file.
|
public Comparer(ComparerSettings settings)
public Comparer(InputStream document)
Initializes new instance of Comparer
class with source document stream.
document
- Source document streampublic Comparer(InputStream document, ComparerSettings settings)
Initializes new instance of Comparer
class with source document stream and ComparerSettings
.
document
- Source document streamsettings
- Settings for comparisonpublic Comparer(InputStream document, LoadOptions loadOptions)
Initializes new instance of Comparer
with source document stream and LoadOptions
.
document
- Source document streamloadOptions
- Load optionspublic Comparer(InputStream document, LoadOptions loadOptions, ComparerSettings settings)
Initializes new instance of Comparer
class with document stream, LoadOptions
and ComparerSettings
.
document
- Source document streamloadOptions
- Load optionssettings
- Settings for comparisonpublic Comparer(String filePath)
Initializes new instance of Comparer
class with source file path.
filePath
- File pathpublic Comparer(String filePath, ComparerSettings settings)
Initializes new instance of Comparer
class with source file path and ComparerSettings
.
filePath
- File patssettings
- Settings for comparisonpublic Comparer(String filePath, LoadOptions loadOptions)
Initializes new instance of Comparer
with source file path and LoadOptions
.
filePath
- File pathloadOptions
- Load optionspublic Comparer(String filePath, LoadOptions loadOptions, ComparerSettings settings)
Initializes new instance of Comparer
class with source file path, LoadOptions
and ComparerSettings
.
filePath
- File pathloadOptions
- Load optionssettings
- Settings for comparisonpublic final void add(InputStream... documents)
Adds document stream to comparison.
documents
- Compared documents streamspublic final void add(InputStream document)
Adds document stream to comparison.
document
- Compared document streampublic final void add(InputStream document, LoadOptions loadOptions)
Adds document stream to comparison with loading options specified.
document
- Compared document streamloadOptions
- Load optionspublic final void add(String... filePaths)
Adds file to comparison.
filePaths
- Compared files pathspublic final void add(String filePath)
Adds file to comparison.
filePath
- Compared file pathpublic final void add(String filePath, LoadOptions loadOptions)
Adds file to comparison with loading options specified.
filePath
- Compared file pathloadOptions
- Load optionspublic final void applyChanges(OutputStream document, ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
document
- Result documentapplyChangeOptions
- Apply change optionspublic final void applyChanges(OutputStream document, SaveOptions saveOptions, ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
document
- Result documentsaveOptions
- Save optionsapplyChangeOptions
- Apply change optionspublic final void applyChanges(String filePath, ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
filePath
- Result file pathapplyChangeOptions
- Apply change optionspublic final void applyChanges(String filePath, SaveOptions saveOptions, ApplyChangeOptions applyChangeOptions)
Accepts or rejects changes and applies them to resultant document.
filePath
- Result file pathsaveOptions
- Save optionsapplyChangeOptions
- Apply change optionspublic final void compare()
Compares documents without saving result with default options
public final void compare(CompareOptions compareOptions)
Compares documents without saving result.
compareOptions
- Compare optionspublic final void compare(OutputStream document)
Compares documents and saves result to file stream
document
- Result document streampublic final void compare(OutputStream document, CompareOptions compareOptions)
Compares documents and saves result to file stream
document
- Result document streamcompareOptions
- Compare optionspublic final void compare(OutputStream document, SaveOptions saveOptions)
Compares documents and save result to file stream
document
- Result document streamsaveOptions
- Save optionspublic final void compare(OutputStream document, SaveOptions saveOptions, CompareOptions compareOptions)
Compares documents and saves result to a stream.
document
- Result document streamsaveOptions
- Save optionscompareOptions
- Compare optionspublic final void compare(SaveOptions saveOptions, CompareOptions compareOptions)
Compares documents without saving result.
saveOptions
- Save optionscompareOptions
- Compare optionspublic final void compare(String filePath)
Compares documents and saves result to file path
filePath
- Result document pathpublic final void compare(String filePath, CompareOptions compareOptions)
Compares documents and saves result to file path
filePath
- Result document file pathcompareOptions
- Compare optionspublic final void compare(String filePath, SaveOptions saveOptions)
Compares documents and save result to file path
filePath
- Result document file pathsaveOptions
- Save optionspublic final void compare(String filePath, SaveOptions saveOptions, CompareOptions compareOptions)
Compares documents and saves result to file path
filePath
- Result document file pathsaveOptions
- Save optionscompareOptions
- Compare optionspublic final void dispose()
Releases resources.
dispose
in interface com.aspose.ms.System.IDisposable
public final ChangeInfo[] getChanges()
Gets list of changes between source and target file(s).
public final ChangeInfo[] getChanges(GetChangeOptions getChangeOptions)
Gets list of changes between source and target file(s).
getChangeOptions
- Get change optionspublic final Document getSource()
Source file that is being compared.
Copyright © 2020. All rights reserved.