DocumentRecoveryMode

Inheritance: java.lang.Object

public class DocumentRecoveryMode

Specifies the available recovery options when a document encounters errors during loading.

Examples:

Shows how to try to recover a document if errors occurred during loading.


 LoadOptions loadOptions = new LoadOptions();
 loadOptions.setRecoveryMode(DocumentRecoveryMode.TRY_RECOVER);

 Document doc = new Document(getMyDir() + "Corrupted footnotes.docx", loadOptions);
 

Fields

FieldDescription
NONENo recovery is attempted.
TRY_RECOVERAttempts to recover the document while preserving as much data as possible.
length

Methods

MethodDescription
fromName(String documentRecoveryModeName)
getName(int documentRecoveryMode)
getValues()
toString(int documentRecoveryMode)

NONE

public static int NONE

No recovery is attempted. If the document is invalid, loading will fail with an error.

TRY_RECOVER

public static int TRY_RECOVER

Attempts to recover the document while preserving as much data as possible.

length

public static int length

fromName(String documentRecoveryModeName)

public static int fromName(String documentRecoveryModeName)

Parameters:

ParameterTypeDescription
documentRecoveryModeNamejava.lang.String

Returns: int

getName(int documentRecoveryMode)

public static String getName(int documentRecoveryMode)

Parameters:

ParameterTypeDescription
documentRecoveryModeint

Returns: java.lang.String

getValues()

public static int[] getValues()

Returns: int[]

toString(int documentRecoveryMode)

public static String toString(int documentRecoveryMode)

Parameters:

ParameterTypeDescription
documentRecoveryModeint

Returns: java.lang.String