Modifier and Type | Class and Description |
---|---|
(package private) static class |
PDFXRefStream.FreeReference
A class representing a free reference.
|
(package private) static class |
PDFXRefStream.NormalReference
A class representing a normal reference.
|
(package private) static class |
PDFXRefStream.ObjectStreamReference
A class representing an object stream reference.
|
Modifier and Type | Field and Description |
---|---|
private static int |
ENTRY_FREE |
private static int |
ENTRY_NORMAL |
private static int |
ENTRY_OBJSTREAM |
private java.util.Set<java.lang.Long> |
objectNumbers |
private long |
size |
private COSStream |
stream |
private java.util.Map<java.lang.Long,java.lang.Object> |
streamData |
Constructor and Description |
---|
PDFXRefStream()
Deprecated.
|
PDFXRefStream(COSDocument cosDocument)
Create a fresh XRef stream like for a fresh file or an incremental update.
|
Modifier and Type | Method and Description |
---|---|
void |
addEntry(COSWriterXRefEntry entry)
Add an new entry to the XRef stream.
|
void |
addTrailerInfo(COSDictionary trailerDict)
Copy all Trailer Information to this file.
|
private java.util.List<java.lang.Long> |
getIndexEntry() |
COSObject |
getObject(int objectNumber)
Returns the object referenced by the given object number.
|
COSStream |
getStream()
Returns the stream of the XRef.
|
private int[] |
getWEntry()
determines the minimal length required for all the lengths.
|
void |
setSize(long streamSize)
Set the size of the XRef stream.
|
private void |
writeNumber(java.io.OutputStream os,
long number,
int bytes) |
private void |
writeStreamData(java.io.OutputStream os,
int[] w) |
private static final int ENTRY_OBJSTREAM
private static final int ENTRY_NORMAL
private static final int ENTRY_FREE
private final java.util.Map<java.lang.Long,java.lang.Object> streamData
private final java.util.Set<java.lang.Long> objectNumbers
private final COSStream stream
private long size
@Deprecated public PDFXRefStream()
PDFXRefStream(org.apache.pdfbox.cos.COSDocument)
public PDFXRefStream(COSDocument cosDocument)
cosDocument
- public COSStream getStream() throws java.io.IOException
java.io.IOException
- if something went wrongpublic void addTrailerInfo(COSDictionary trailerDict)
trailerDict
- dictionary to be added as trailer infopublic void addEntry(COSWriterXRefEntry entry)
entry
- new entry to be addedprivate int[] getWEntry()
public void setSize(long streamSize)
streamSize
- size to bet set as stream sizeprivate java.util.List<java.lang.Long> getIndexEntry()
private void writeNumber(java.io.OutputStream os, long number, int bytes) throws java.io.IOException
java.io.IOException
private void writeStreamData(java.io.OutputStream os, int[] w) throws java.io.IOException
java.io.IOException