Am 02.04.2015 um 15:36 schrieb Andrea Vacondio:
I see parseCOSStream is defined in BaseParser and COSParser is it on
purpose? They kinda look like duplicates so I was wandering if it's a
mistake and one can go.


I found one roadblock: COSParser expects a seekable input stream for the validateStreamLength method. This isn't obvious, because PushBackInputStream offers a seek() method. However that one is supported only if its construction input stream implements RandomAccessRead.

BaseParser doesn't need the seek, but the code is more complex, and needs more space in its PushBackInputStream. BaseParser is used e.g. for content streams in COSStreamArray:

    return new SequenceInputStream( inputStreams.elements() );

which is why it can't be made seekable.

Tilman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to