@Deprecated public class DocumentFactory extends Object implements IDocumentFactory
Represents a set of methods for creating instances of documents. This class also can be used for getting document information (format, password protection etc).
Constructor and Description |
---|
DocumentFactory()
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
DocumentInfo |
getInfo(InputStream stream)
Deprecated.
Gets an information about the format of a document stored in the stream.
|
DocumentInfo |
getInfo(String filePath)
Deprecated.
Gets an information about the format of a document stored in the file.
|
<TDocument extends Document> |
load(Class<TDocument> documentType,
InputStream stream)
Deprecated.
Loads a new document from the specified stream.
|
<TDocument extends Document> |
load(Class<TDocument> documentType,
InputStream stream,
LoadOptions loadOptions)
Deprecated.
Loads a new document from the specified stream.
|
<TDocument extends Document> |
load(Class<TDocument> documentType,
String filePath)
Deprecated.
Loads a new document from the specified file.
|
<TDocument extends Document> |
load(Class<TDocument> documentType,
String filePath,
LoadOptions loadOptions)
Deprecated.
Loads a new document from the specified file.
|
Document |
load(InputStream stream)
Deprecated.
Loads a new document from the specified stream.
|
Document |
load(InputStream stream,
LoadOptions loadOptions)
Deprecated.
Loads a new document from the specified stream.
|
Document |
load(String filePath)
Deprecated.
Loads a new document from the specified file.
|
Document |
load(String filePath,
LoadOptions loadOptions)
Deprecated.
Loads a new document from the specified file.
|
public final Document load(String filePath)
Loads a new document from the specified file.
load
in interface IDocumentFactory
filePath
- The file path to load document from.Document
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final Document load(String filePath, LoadOptions loadOptions)
Loads a new document from the specified file.
load
in interface IDocumentFactory
filePath
- The file path to load document from.loadOptions
- Additional options to use when loading a document.Document
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final Document load(InputStream stream)
Loads a new document from the specified stream.
load
in interface IDocumentFactory
stream
- The stream to load document from.Document
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final Document load(InputStream stream, LoadOptions loadOptions)
Loads a new document from the specified stream.
load
in interface IDocumentFactory
stream
- The stream to load document from.loadOptions
- Additional options to use when loading a document.Document
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final <TDocument extends Document> TDocument load(Class<TDocument> documentType, String filePath)
Loads a new document from the specified file.
load
in interface IDocumentFactory
filePath
- The file path to load document from.documentType
- Expected document type (according to specified file type).
TDocument
: Expected document type (according to specified file type).
TDocument
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final <TDocument extends Document> TDocument load(Class<TDocument> documentType, String filePath, LoadOptions loadOptions)
Loads a new document from the specified file.
load
in interface IDocumentFactory
filePath
- The file path to load document from.loadOptions
- Additional options to use when loading a document.documentType
- Expected document type (according to specified file type).
TDocument
: Expected document type (according to specified file type).
TDocument
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final <TDocument extends Document> TDocument load(Class<TDocument> documentType, InputStream stream)
Loads a new document from the specified stream.
load
in interface IDocumentFactory
stream
- The stream to load document from.documentType
- Expected document type (according to specified file type).
TDocument
: Expected document type (according to specified stream content).
TDocument
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final <TDocument extends Document> TDocument load(Class<TDocument> documentType, InputStream stream, LoadOptions loadOptions)
Loads a new document from the specified stream.
load
in interface IDocumentFactory
stream
- The stream to load document from.loadOptions
- Additional options to use when loading a document.documentType
- Expected document type (according to specified file type).
TDocument
: Expected document type (according to specified stream content).
TDocument
class.UnsupportedFileTypeException
- Supplied document type is not supported.public final DocumentInfo getInfo(String filePath)
Gets an information about the format of a document stored in the file.
getInfo
in interface IDocumentFactory
filePath
- The file path.DocumentInfo
instance that contains detected information.public final DocumentInfo getInfo(InputStream stream)
Gets an information about the format of a document stored in the stream.
getInfo
in interface IDocumentFactory
stream
- The stream containing a document.DocumentInfo
instance that contains detected information.