public class DocumentMergerExecutor extends Object
| Modifier and Type | Method and Description |
|---|---|
void |
addDocumentToMerge(byte[] document,
boolean toStart) |
void |
addDocumentToMerge(File document,
boolean toStart) |
byte[] |
executeMerge()
Merges all specified documents one by one.
|
static DocumentMergerExecutor |
fromList(List<File> documents)
The same method as @
fromRawList, but allows use documents in File |
static DocumentMergerExecutor |
fromRawList(List<byte[]> rawDocuments)
Initializes DocumentMergerExecutor with list, added just for better readability.
|
static DocumentMergerExecutor |
getInstance() |
public static DocumentMergerExecutor getInstance()
public static DocumentMergerExecutor fromRawList(List<byte[]> rawDocuments)
rawDocuments - list with binary documents, which needs to be mergedpublic void addDocumentToMerge(byte[] document,
boolean toStart)
document - new document to mergetoStart - add document to start or to the endpublic void addDocumentToMerge(File document, boolean toStart)
document - new document to mergetoStart - add document to start or to the endpublic static DocumentMergerExecutor fromList(List<File> documents)
fromRawList, but allows use documents in Filedocuments - list with File documents, which needs to be mergedpublic byte[] executeMerge()
Copyright © 2020. All rights reserved.