public class DmsExchange extends Object
| Constructor and Description |
|---|
DmsExchange() |
| Modifier and Type | Method and Description |
|---|---|
static DmsReader |
createReader(File file)
Provides a export-archive reader for
Documents that are contained in the passed file. |
static DmsReader |
createReader(InputStream inputstream)
Provides a export-archive reader for
Documents that are read from the passed InputStream. |
static DmsReader |
createReader(String file)
Provides a export-archive reader for
Documents that are contained in the passed file. |
static DmsWriter |
createWriter(File file)
|
static ConditionalDmsWriter |
createWriter(File directory,
Integer thresholdDocuments)
Provides a conditional writer to create (potentially) multiple export-archives with
Documents in the
given directory. |
static ConditionalDmsWriter |
createWriter(File directory,
Integer thresholdDocuments,
Integer thresholdFilesize)
Provides a conditional writer to create (potentially) multiple export-archives with
Documents in the
given directory. |
static DmsWriter |
createWriter(OutputStream outputstream)
Provides a writer to create an export-archive with
Documents that is written to the given
OutputStream. |
public static DmsReader createReader(String file) throws DmsExchangeException
Documents that are contained in the passed file.file - Absolute path to an export-archive with DocumentsDmsReader that is used to read documents from a file.DmsExchangeException - If the file can't be read or other bad things happenpublic static DmsReader createReader(File file) throws DmsExchangeException
Documents that are contained in the passed file.file - Location of the export-archive with DocumentsDmsReader that is used to read documents from a file.DmsExchangeException - If the file can't be read or other bad things happenpublic static DmsReader createReader(InputStream inputstream)
Documents that are read from the passed InputStream.inputstream - Stream containing data from an export-archiveDmsReader that is used to read documents from the given InputStream.DmsExchangeException - If the data can't be read or other bad things happenpublic static DmsWriter createWriter(File file) throws DmsExchangeException
file - The file which is used to store the export-archive data. If the file already exists, it will be
overwritten. Non-existing parent-directories will be created. If file is a directory, an
IllegalArgumentException will be thrown.Documents and must be closed when finished.DmsExchangeException - Encapsulating parent Exception for erroneous behaviourpublic static DmsWriter createWriter(OutputStream outputstream) throws DmsExchangeException
Documents that is written to the given
OutputStream.outputstream - OutputStream the export-archive is written to.Documents and must be closed when finished.DmsExchangeException - Encapsulating parent Exception for erroneous behaviourpublic static ConditionalDmsWriter createWriter(File directory, Integer thresholdDocuments) throws DmsExchangeException
Documents in the
given directory. If the given condition (thesholdDocuments) is matched, the export continuous on a new
export-archive.directory - Location where to create the export-archive files with a generated unique name.thresholdDocuments - Limit of Documents a single export-archive can have, before creating a new
export-archive.Documents and must be closed when finished. The files written
by the instance can be queried using the getFiles() method.DmsExchangeException - Encapsulating parent Exception for erroneous behaviourpublic static ConditionalDmsWriter createWriter(File directory, Integer thresholdDocuments, Integer thresholdFilesize) throws DmsExchangeException
Documents in the
given directory. If one of the the given conditions (thesholdDocuments or thresholdFilesize) is matched, the
export continuous on a new export-archive.directory - Location where to create the export-archive files with a generated unique name.thresholdDocuments - Limit of Documents a single export-archive can have, before creating a new
export-archive.thresholdFilesize - Filesize in bytes the final export (approximately) can become, before creating a new
export-archive.Documents and must be closed when finished. The files written
by the instance can be queried using the getFiles() method.DmsExchangeException - Encapsulating parent Exception for erroneous behaviourCopyright © 2015. All rights reserved.