Package org.apache.pdfbox.pdfparser
Class PDFXRefStream
java.lang.Object
org.apache.pdfbox.pdfparser.PDFXRefStream
- Author:
- Alexander Funk
-
Constructor Summary
ConstructorsConstructorDescriptionPDFXRefStream(COSDocument cosDocument) Create a fresh XRef stream like for a fresh file or an incremental update. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddEntry(XReferenceEntry entry) Add an new entry to the XRef stream.voidaddTrailerInfo(COSDictionary trailerDict) Copy all Trailer Information to this file.Returns the stream of the XRef.voidsetSize(long streamSize) Set the size of the XRef stream.
-
Constructor Details
-
PDFXRefStream
Create a fresh XRef stream like for a fresh file or an incremental update.- Parameters:
cosDocument- the COSDocument to be used to create a new COSStream
-
-
Method Details
-
getStream
Returns the stream of the XRef.- Returns:
- the XRef stream
- Throws:
IOException- if something went wrong
-
addTrailerInfo
Copy all Trailer Information to this file.- Parameters:
trailerDict- dictionary to be added as trailer info
-
addEntry
Add an new entry to the XRef stream.- Parameters:
entry- new entry to be added
-
setSize
public void setSize(long streamSize) Set the size of the XRef stream.- Parameters:
streamSize- size to bet set as stream size
-