LoadOptions

Inheritance: java.lang.Object

public class LoadOptions

Allows specifying additional options when loading a document.

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);
 }
 

Constructors

Constructor 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(String password) Initializes a new instance of the LoadOptions class with a password to load document.
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.

Methods

Method Description
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).
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).
getPassword() Gets a password that will be used to load a document.
setPassword(String value) Sets a password that should be used to load a document.
getFontDirectories() Gets a list of directories where font files to load a document are placed.
setFontDirectories(List value) Sets a list of directories where font files to load a document are placed.
getFileType() Gets a type of a file that is loading.
setFileType(FileType value) Sets a type of a file that is loading.

LoadOptions()

public LoadOptions()

Initializes a new instance of the LoadOptions class.

LoadOptions(boolean isLoadText)

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.

Parameters:

Parameter Type Description
isLoadText boolean The flag which means that input string is a text to compare, not path

LoadOptions(String password)

public LoadOptions(String password)

Initializes a new instance of the LoadOptions class with a password to load document.

Parameters:

Parameter Type Description
password java.lang.String The password to load document

LoadOptions(boolean isLoadText, String password)

public 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.

Parameters:

Parameter Type Description
isLoadText boolean The flag which means that input string is a text to compare, not path
password java.lang.String The password to load document

LoadOptions(FileType fileType)

public LoadOptions(FileType fileType)

Initializes a new instance of the LoadOptions class with a type of a file.

Parameters:

Parameter Type Description
fileType FileType The type of the file

isLoadText()

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).

Returns: boolean - true if input string is a text to compare, otherwise false

setLoadText(boolean value)

public 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).

Parameters:

Parameter Type Description
value boolean true if input string is a text to compare, otherwise false

getPassword()

public final String getPassword()

Gets a password that will be used to load a document.

Returns: java.lang.String - the password to load the document

setPassword(String value)

public final void setPassword(String value)

Sets a password that should be used to load a document.

Parameters:

Parameter Type Description
value java.lang.String The password to load the document

getFontDirectories()

public List<String> getFontDirectories()

Gets a list of directories where font files to load a document are placed.

Returns: java.util.List<java.lang.String> - the list of directories with font files

setFontDirectories(List value)

public void setFontDirectories(List<String> value)

Sets a list of directories where font files to load a document are placed.

Parameters:

Parameter Type Description
value java.util.List<java.lang.String> The list of directories with font files

getFileType()

public FileType getFileType()

Gets a type of a file that is loading.

Returns: FileType - the type of the file

setFileType(FileType value)

public void setFileType(FileType value)

Sets a type of a file that is loading.

Parameters:

Parameter Type Description
value FileType The type of the file