LoadOptions
Leave feedback
On this page
Inheritance: java.lang.Object
public class LoadOptions
Provides the options which are used to open a file.
An instance of this class is used as parameter in Parser class constructors:
See the usage examples there.
Learn more:
| Constructor | Description |
|---|---|
| LoadOptions(Duration timeout) | Initializes a new instance of the LoadOptions class with timeout . |
| LoadOptions() | Initializes a new instance of the LoadOptions class with empty Password , FileFormat equal to FileFormat.Unknown and default encodings. |
| LoadOptions(String password) | Initializes a new instance of the LoadOptions class with FileFormat equal to FileFormat.Unknown and default encodings. |
| LoadOptions(FileFormat fileFormat) | Initializes a new instance of the LoadOptions class with empty Password and default encodings. |
| LoadOptions(FileFormat fileFormat, String password) | Initializes a new instance of the LoadOptions class with default encodings. |
| LoadOptions(FileFormat fileFormat, String password, Charset charset, Charset defaultAnsiCharset) | Initializes a new instance of the LoadOptions class with custom encodings. |
| LoadOptions(FileFormat fileFormat, String password, Charset charset, Charset defaultAnsiCharset, Duration timeout) | Initializes a new instance of the LoadOptions fully customized class. |
| LoadOptions(FileType fileType) | Initializes a new instance of the LoadOptions class with empty Password and default encodings. |
| LoadOptions(FileType fileType, String password) | Initializes a new instance of the LoadOptions class with password and default encodings. |
| LoadOptions(FileType fileType, String password, Charset charset, Charset defaultAnsiCharset) | Initializes a new instance of the LoadOptions class with custom encodings. |
| LoadOptions(FileType fileType, String password, Charset charset, Charset defaultAnsiCharset, Duration timeout) | Initializes a new instance of the LoadOptions fully customized class. |
| Method | Description |
|---|---|
| getFileFormat() | Gets the file format. |
| getFileType() | Gets the file type. |
| getPassword() | Gets the password. |
| getCharset() | Gets the encoding of the document. |
| getDefaultAnsiCharset() | Gets the default ANSI encoding which is used for encoding detection. |
| getTimeout() | Gets the value that represents the number of milliseconds to wait. |
public LoadOptions(Duration timeout)
Initializes a new instance of the LoadOptions class with timeout .
Parameters:
| Parameter | Type | Description |
|---|---|---|
| timeout | java.time.Duration | The Duration that represents the number of milliseconds to wait. |
public LoadOptions()
Initializes a new instance of the LoadOptions class with empty Password , FileFormat equal to FileFormat.Unknown and default encodings.
public LoadOptions(String password)
Initializes a new instance of the LoadOptions class with FileFormat equal to FileFormat.Unknown and default encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| password | java.lang.String | The password to open the password-protected file. |
public LoadOptions(FileFormat fileFormat)
Initializes a new instance of the LoadOptions class with empty Password and default encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileFormat | FileFormat | The format of the file. |
public LoadOptions(FileFormat fileFormat, String password)
Initializes a new instance of the LoadOptions class with default encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileFormat | FileFormat | The format of the file. |
| password | java.lang.String | The password to open the password-protected file. |
public LoadOptions(FileFormat fileFormat, String password, Charset charset, Charset defaultAnsiCharset)
Initializes a new instance of the LoadOptions class with custom encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileFormat | FileFormat | The format of the file. |
| password | java.lang.String | The password to open the password-protected file. |
| charset | java.nio.charset.Charset | The encoding of the document. |
| defaultAnsiCharset | java.nio.charset.Charset | The default ANSI encoding which is used for encoding detection. |
LoadOptions(FileFormat fileFormat, String password, Charset charset, Charset defaultAnsiCharset, Duration timeout)
public LoadOptions(FileFormat fileFormat, String password, Charset charset, Charset defaultAnsiCharset, Duration timeout)
Initializes a new instance of the LoadOptions fully customized class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileFormat | FileFormat | The format of the file. |
| password | java.lang.String | The password to open the password-protected file. |
| charset | java.nio.charset.Charset | The encoding of the document. |
| defaultAnsiCharset | java.nio.charset.Charset | The default ANSI encoding which is used for encoding detection. |
| timeout | java.time.Duration | The Duration that represents the number of milliseconds to wait. |
public LoadOptions(FileType fileType)
Initializes a new instance of the LoadOptions class with empty Password and default encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileType | FileType | The type of the file. |
public LoadOptions(FileType fileType, String password)
Initializes a new instance of the LoadOptions class with password and default encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileType | FileType | The type of the file. |
| password | java.lang.String | The password to open the password-protected file. |
public LoadOptions(FileType fileType, String password, Charset charset, Charset defaultAnsiCharset)
Initializes a new instance of the LoadOptions class with custom encodings.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileType | FileType | The type of the file. |
| password | java.lang.String | The password to open the password-protected file. |
| charset | java.nio.charset.Charset | The encoding of the document. |
| defaultAnsiCharset | java.nio.charset.Charset | The default ANSI encoding which is used for encoding detection. |
LoadOptions(FileType fileType, String password, Charset charset, Charset defaultAnsiCharset, Duration timeout)
public LoadOptions(FileType fileType, String password, Charset charset, Charset defaultAnsiCharset, Duration timeout)
Initializes a new instance of the LoadOptions fully customized class.
Parameters:
| Parameter | Type | Description |
|---|---|---|
| fileType | FileType | The type of the file. |
| password | java.lang.String | The password to open the password-protected file. |
| charset | java.nio.charset.Charset | The encoding of the document. |
| defaultAnsiCharset | java.nio.charset.Charset | The default ANSI encoding which is used for encoding detection. |
| timeout | java.time.Duration | The Duration that represents the number of milliseconds to wait. |
public FileFormat getFileFormat()
Gets the file format.
Returns: FileFormat - FileFormat enumeration that contains a file format.
public FileType getFileType()
Gets the file type.
Returns: FileType - FileFormat enumeration that contains a file type.
public String getPassword()
Gets the password.
Returns: java.lang.String - A string value that represents a password to open the password-protected file.
public Charset getCharset()
Gets the encoding of the document.
Returns: java.nio.charset.Charset - An instance of Charset class that represents the document encoding; null if it isn’t set.
public Charset getDefaultAnsiCharset()
Gets the default ANSI encoding which is used for encoding detection.
Returns: java.nio.charset.Charset - An instance of Charset class that represents the document encoding; null if it isn’t set.
public Duration getTimeout()
Gets the value that represents the number of milliseconds to wait.
Returns: java.time.Duration - An instance of Duration that represents the number of milliseconds to wait.
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.