
**Inheritance:**
java.lang.Object
```
public class LoadOptions
```

Allows to specify additional load parameters when loading a project from file or stream.
## Constructors

| Constructor | Description |
| --- | --- |
| [LoadOptions()](#LoadOptions--) | Initializes a new instance of the [LoadOptions](../../com.aspose.tasks/loadoptions) class. |
## Methods

| Method | Description |
| --- | --- |
| [getCancellationToken()](#getCancellationToken--) | Gets a token which can be used to cancel a project loading operation. |
| [getEncoding()](#getEncoding--) | Gets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats. |
| [getErrorHandler()](#getErrorHandler--) | Gets a callback method to handle xml parse errors. |
| [getPassword()](#getPassword--) | Gets a protection password. |
| [getPrimaveraReadOptions()](#getPrimaveraReadOptions--) | Gets a specified instance of the [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml). |
| [getProjectLoadingCallback()](#getProjectLoadingCallback--) | Gets the callback to be invoked during project loading operations. |
| [setCancellationToken(CancellationToken value)](#setCancellationToken-com.aspose.tasks.CancellationToken-) | Sets a token which can be used to cancel a project loading operation. |
| [setEncoding(Charset value)](#setEncoding-java.nio.charset.Charset-) | Sets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats. |
| [setErrorHandler(ParseErrorCallback value)](#setErrorHandler-com.aspose.tasks.ParseErrorCallback-) | Sets a callback method to handle xml parse errors. |
| [setPassword(String value)](#setPassword-java.lang.String-) | Sets a protection password. |
| [setPrimaveraReadOptions(PrimaveraReadOptions value)](#setPrimaveraReadOptions-com.aspose.tasks.PrimaveraReadOptions-) | Sets a specified instance of the [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml). |
| [setProjectLoadingCallback(IProgressNotificationCallback value)](#setProjectLoadingCallback-com.aspose.tasks.IProgressNotificationCallback-) | Sets the callback to be invoked during project loading operations. |
### LoadOptions() {#LoadOptions--}
```
public LoadOptions()
```


Initializes a new instance of the [LoadOptions](../../com.aspose.tasks/loadoptions) class.

### getCancellationToken() {#getCancellationToken--}
```
public final CancellationToken getCancellationToken()
```


Gets a token which can be used to cancel a project loading operation.

**Returns:**
[CancellationToken](../../com.aspose.tasks/cancellationtoken) - a token which can be used to cancel a project loading operation.
### getEncoding() {#getEncoding--}
```
public final Charset getEncoding()
```


Gets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats. The default encoding is UTF8.

**Returns:**
java.nio.charset.Charset - encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats.
### getErrorHandler() {#getErrorHandler--}
```
public final ParseErrorCallback getErrorHandler()
```


Gets a callback method to handle xml parse errors.

**Returns:**
[ParseErrorCallback](../../com.aspose.tasks/parseerrorcallback) - a callback method to handle xml parse errors.
### getPassword() {#getPassword--}
```
public final String getPassword()
```


Gets a protection password.

**Returns:**
java.lang.String - a protection password.
### getPrimaveraReadOptions() {#getPrimaveraReadOptions--}
```
public final PrimaveraReadOptions getPrimaveraReadOptions()
```


Gets a specified instance of the [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml).

**Returns:**
[PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) - a specified instance of the [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml).
### getProjectLoadingCallback() {#getProjectLoadingCallback--}
```
public final IProgressNotificationCallback getProjectLoadingCallback()
```


Gets the callback to be invoked during project loading operations. Currently supported for MPP format.

**Returns:**
[IProgressNotificationCallback](../../com.aspose.tasks/iprogressnotificationcallback) - the callback to be invoked during project loading operations.
### setCancellationToken(CancellationToken value) {#setCancellationToken-com.aspose.tasks.CancellationToken-}
```
public final void setCancellationToken(CancellationToken value)
```


Sets a token which can be used to cancel a project loading operation.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [CancellationToken](../../com.aspose.tasks/cancellationtoken) | a token which can be used to cancel a project loading operation. |

### setEncoding(Charset value) {#setEncoding-java.nio.charset.Charset-}
```
public final void setEncoding(Charset value)
```


Sets encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats. The default encoding is UTF8.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.nio.charset.Charset | encoding which is used to read a project from HTML, MPX, XER and Primavera XML formats. |

### setErrorHandler(ParseErrorCallback value) {#setErrorHandler-com.aspose.tasks.ParseErrorCallback-}
```
public final void setErrorHandler(ParseErrorCallback value)
```


Sets a callback method to handle xml parse errors.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [ParseErrorCallback](../../com.aspose.tasks/parseerrorcallback) | a callback method to handle xml parse errors. |

### setPassword(String value) {#setPassword-java.lang.String-}
```
public final void setPassword(String value)
```


Sets a protection password.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | java.lang.String | a protection password. |

### setPrimaveraReadOptions(PrimaveraReadOptions value) {#setPrimaveraReadOptions-com.aspose.tasks.PrimaveraReadOptions-}
```
public final void setPrimaveraReadOptions(PrimaveraReadOptions value)
```


Sets a specified instance of the [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml).

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) | a specified instance of the [PrimaveraReadOptions](../../com.aspose.tasks/primaverareadoptions) class which can be used to customize the behavior of loading Primavera formats (Primavera P6 XER or Primavera P6 Xml). |

### setProjectLoadingCallback(IProgressNotificationCallback value) {#setProjectLoadingCallback-com.aspose.tasks.IProgressNotificationCallback-}
```
public final void setProjectLoadingCallback(IProgressNotificationCallback value)
```


Sets the callback to be invoked during project loading operations. Currently supported for MPP format.

**Parameters:**
| Parameter | Type | Description |
| --- | --- | --- |
| value | [IProgressNotificationCallback](../../com.aspose.tasks/iprogressnotificationcallback) | the callback to be invoked during project loading operations. |

