public class LoadOptions extends Object
Example usage:
final LoadOptions loadOptions = new LoadOptions();
loadOptions.setPassword("passw");
loadOptions.setFileType(FileType.PDF);
try (Comparer comparer = new Comparer(sourceFile, loadOptions)) {
comparer.add(targetFile);
comparer.compare(resultFile);
}
Comparer| Modifier and Type | Class and Description |
|---|---|
static class |
LoadOptions.Builder
A
LoadOptions builder. |
| Constructor and Description |
|---|
LoadOptions()
Initializes a new instance of the LoadOptions class.
|
LoadOptions(boolean isLoadText)
Initializes a new instance of the LoadOptions class with a flag which means that input string is a text to compare, not path.
|
LoadOptions(boolean isLoadText,
String password)
Initializes a new instance of the LoadOptions class with a flag which means that input string is a text to compare and a password to load document.
|
LoadOptions(FileType fileType)
Initializes a new instance of the LoadOptions class with a type of a file.
|
LoadOptions(String password)
Initializes a new instance of the LoadOptions class with a password to load document.
|
| Modifier and Type | Method and Description |
|---|---|
FileType |
getFileType()
Gets a type of a file that is loading.
|
List<String> |
getFontDirectories()
Gets a list of directories where font files to load a document are placed.
|
String |
getPassword()
Gets a password that will be used to load a document.
|
boolean |
isLoadText()
Gets a flag that indicates that the string passed to
Comparer constructor or to Comparer.add(String) method is comparison text, not file paths (For Text Comparison only). |
void |
setFileType(FileType value)
Sets a type of a file that is loading.
|
void |
setFontDirectories(List<String> value)
Sets a list of directories where font files to load a document are placed.
|
void |
setLoadText(boolean value)
Sets a flag that indicates that the string passed to
Comparer constructor or to Comparer.add(String) method is comparison text, not file paths (For Text Comparison only). |
void |
setPassword(String value)
Sets a password that should be used to load a document.
|
public LoadOptions()
Initializes a new instance of the LoadOptions class.
public LoadOptions(boolean isLoadText)
Initializes a new instance of the LoadOptions class with a flag which means that input string is a text to compare, not path.
isLoadText - The flag which means that input string is a text to compare, not pathpublic LoadOptions(boolean isLoadText,
String password)
Initializes a new instance of the LoadOptions class with a flag which means that input string is a text to compare and a password to load document.
isLoadText - The flag which means that input string is a text to compare, not pathpassword - The password to load documentpublic LoadOptions(FileType fileType)
Initializes a new instance of the LoadOptions class with a type of a file.
fileType - The type of the filepublic LoadOptions(String password)
Initializes a new instance of the LoadOptions class with a password to load document.
password - The password to load documentpublic FileType getFileType()
Gets a type of a file that is loading.
public List<String> getFontDirectories()
Gets a list of directories where font files to load a document are placed.
public final String getPassword()
Gets a password that will be used to load a document.
public boolean isLoadText()
Gets a flag that indicates that the string passed to Comparer constructor or to Comparer.add(String) method is comparison text, not file paths (For Text Comparison only).
public void setFileType(FileType value)
Sets a type of a file that is loading.
value - The type of the filepublic void setFontDirectories(List<String> value)
Sets a list of directories where font files to load a document are placed.
value - The list of directories with font filespublic void setLoadText(boolean value)
Sets a flag that indicates that the string passed to Comparer constructor or to Comparer.add(String) method is comparison text, not file paths (For Text Comparison only).
value - true if input string is a text to compare, otherwise falsepublic final void setPassword(String value)
Sets a password that should be used to load a document.
value - The password to load the documentCopyright © 2024. All rights reserved.