Package com.tom_roush.pdfbox.pdfparser
Class PDFXRefStream
- java.lang.Object
-
- com.tom_roush.pdfbox.pdfparser.PDFXRefStream
-
-
Constructor Summary
Constructors Constructor Description PDFXRefStream()Create a fresh XRef stream like for a fresh file or an incremental update.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddEntry(COSWriterXRefEntry entry)Add an new entry to the XRef stream.voidaddTrailerInfo(COSDictionary trailerDict)Copy all Trailer Information to this file.COSObjectgetObject(int objectNumber)Returns the object referenced by the given object number.COSStreamgetStream()Returns the stream of the XRef.voidsetSize(long streamSize)Set the size of the XRef stream.
-
-
-
Method Detail
-
getStream
public COSStream getStream() throws IOException
Returns the stream of the XRef.- Returns:
- the XRef stream
- Throws:
IOException- if something went wrong
-
addTrailerInfo
public void addTrailerInfo(COSDictionary trailerDict)
Copy all Trailer Information to this file.- Parameters:
trailerDict- dictionary to be added as trailer info
-
addEntry
public void addEntry(COSWriterXRefEntry entry)
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
-
-