java.lang.Object
org.sejda.sambox.output.AsyncPDFBodyObjectsWriter
- All Implemented Interfaces:
Closeable,AutoCloseable,PDFBodyObjectsWriter
Implementation of a PDFBodyObjectsWriter that asynchronously writes
IndirectCOSObjectReference. Objects are
written submitting a task to a single thread executor service.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AtomicReference<IOException>private final ExecutorServiceprivate static final org.slf4j.Loggerprivate final IndirectObjectsWriter -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate voidvoidclose()voidcallback to perform once all the objects have been writtenvoid
-
Field Details
-
LOG
private static final org.slf4j.Logger LOG -
executor
-
executionException
-
writer
-
-
Constructor Details
-
AsyncPDFBodyObjectsWriter
AsyncPDFBodyObjectsWriter(IndirectObjectsWriter writer)
-
-
Method Details
-
writeObject
- Specified by:
writeObjectin interfacePDFBodyObjectsWriter- Throws:
IOException
-
assertCanSubmitAsyncTask
- Throws:
IOException
-
onWriteCompletion
Description copied from interface:PDFBodyObjectsWritercallback to perform once all the objects have been written- Specified by:
onWriteCompletionin interfacePDFBodyObjectsWriter- Throws:
IOException
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-