|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.itextpdf.text.pdf.util.PdfResourceCounter
public class PdfResourceCounter
This class can be used to count the number of bytes needed when copying pages from an existing PDF into a newly created PDF.
Field Summary | |
---|---|
protected Map<Integer,PdfObject> |
resources
A map of the resources that are already taken into account |
Constructor Summary | |
---|---|
PdfResourceCounter(PdfObject object)
Creates a PdfResourceCounter instance to be used to count the resources needed for either a page (in this case pass a page dictionary) or the trailer (root and info dictionary) of a PDF file. |
Method Summary | |
---|---|
long |
getLength(Map<Integer,PdfObject> res)
Returns the resources needed for the object that was used to create this PdfResourceCounter. |
Map<Integer,PdfObject> |
getResources()
Returns a map with the resources. |
protected void |
loopOver(PdfObject object)
In case an object is an array, a dictionary or a stream, we need to loop over the entries and process them one by one. |
protected void |
process(PdfObject object)
Processes an object. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map<Integer,PdfObject> resources
Constructor Detail |
---|
public PdfResourceCounter(PdfObject object)
object
- the object we want to examineMethod Detail |
---|
protected final void process(PdfObject object)
object
- the object to processprotected final void loopOver(PdfObject object)
object
- the object to examinepublic Map<Integer,PdfObject> getResources()
public long getLength(Map<Integer,PdfObject> res) throws IOException
res
- the resources that can be excluded when counting the bytes
IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |