public class COSWriterObjectStream extends Object
COSObjects in a stream. It
may be added to the top level container of a written PDF document in place of the compressed objects. The document's
PDFXRefStream must be adapted accordingly.| Constructor and Description |
|---|
COSWriterObjectStream(COSWriterCompressionPool compressionPool)
Creates an object stream for compressible objects from the given
COSWriterCompressionPool. |
| Modifier and Type | Method and Description |
|---|---|
List<COSObjectKey> |
getPreparedKeys()
Returns all
COSObjectKeys, that shall be added to the object stream, when
writeObjectsToStream(COSStream) is called. |
void |
prepareStreamObject(COSObjectKey key,
COSBase object)
Prepares the given
COSObject to be written to this object stream, using the given COSObjectKey as
it's ID for indirect references. |
COSStream |
writeObjectsToStream(COSStream stream)
|
public COSWriterObjectStream(COSWriterCompressionPool compressionPool)
COSWriterCompressionPool. The objects
must first be prepared for this object stream, by adding them via calling
prepareStreamObject(COSObjectKey, COSBase) and will be written to this
COSStream, when writeObjectsToStream(COSStream) is called.compressionPool - The compression pool an object stream shall be created for.public void prepareStreamObject(COSObjectKey key, COSBase object)
COSObject to be written to this object stream, using the given COSObjectKey as
it's ID for indirect references.key - The COSObjectKey, that shall be used for indirect references to the COSObject.object - The COSObject, that shall be written to this object stream.public List<COSObjectKey> getPreparedKeys()
COSObjectKeys, that shall be added to the object stream, when
writeObjectsToStream(COSStream) is called.COSObjectKeys, that shall be added to the object stream.public COSStream writeObjectsToStream(COSStream stream) throws IOException
stream - The stream for the compressed objects.COSStream of this object stream.IOException - Shall be thrown, if writing the object stream failed.Copyright © 2002–2022 The Apache Software Foundation. All rights reserved.