public class XrefTrailerResolver extends Object
nextXrefObj(int)
must be called with start byte position. All following calls to
setXRef(COSObjectKey, int)
or setTrailer(COSDictionary)
will add the data for this byte position.
After all objects are parsed the startxref position must be provided
using setStartxref(int)
. This is used to build the chain of
active xref/trailer objects used for creating document trailer and xref table.Constructor and Description |
---|
XrefTrailerResolver() |
Modifier and Type | Method and Description |
---|---|
COSDictionary |
getTrailer()
Gets the resolved trailer.
|
Map<COSObjectKey,Integer> |
getXrefTable()
Gets the resolved xref table.
|
void |
nextXrefObj(int startBytePos)
Signals that a new XRef object (table or stream) starts.
|
void |
setStartxref(int startxrefBytePos)
Sets the byte position of the first XRef
(has to be called after very last startxref was read).
|
void |
setTrailer(COSDictionary trailer)
Adds trailer information for current XRef object.
|
void |
setXRef(COSObjectKey objKey,
int offset)
Populate XRef HashMap of current XRef object.
|
public void nextXrefObj(int startBytePos)
startBytePos
- the offset to start atpublic void setXRef(COSObjectKey objKey, int offset)
objKey
- The objkey, with id and gen numbersoffset
- The byte offset in this filepublic void setTrailer(COSDictionary trailer)
trailer
- the current document trailer dictionarypublic void setStartxref(int startxrefBytePos)
public COSDictionary getTrailer()
null
in case
setStartxref(int)
was not called before.public Map<COSObjectKey,Integer> getXrefTable()
null
in case
setStartxref(int)
was not called before.Copyright © 2002-2012 Apache Software Foundation. All Rights Reserved.