Package com.sun.pdfview
Class NameTree
java.lang.Object
com.sun.pdfview.NameTree
A PDF name tree consists of three kinds of nodes:
- The root node contains only a kids entry, pointing to many other objects
- An intermediate node contains the limits of all the children in its subtree, and a kids entry for each child
- A leaf node contains a set of name-to-object mappings in a dictionary, as well as the limits of the data contained in that child.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate PDFObject
Recursively walk the name tree looking for a given valueFind the PDF object corresponding to the given String in a name treeprivate PDFObject
findInArray
(PDFObject[] array, String key) Find an object in a (key,value) array.
-
Field Details
-
root
the root object
-
-
Constructor Details
-
NameTree
Creates a new instance of NameTree
-
-
Method Details
-
find
Find the PDF object corresponding to the given String in a name tree- Parameters:
key
- the key we are looking for in the name tree- Returns:
- the object associated with str, if found, or null if not
- Throws:
IOException
-
find
Recursively walk the name tree looking for a given value- Throws:
IOException
-
findInArray
Find an object in a (key,value) array. Do this by splitting in half repeatedly.- Throws:
IOException
-