|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icesoft.pdf.pobjects.Dictionary
This class represents a PDF document's Dictionary object. A Dictionary object is an associative table containing pairs of objects, known as the dictionary's entries. The first element of each entry is the key and the second element is the value. Dictionary objects are the main building blocks of a PDF document. They are commonly used to collect and tie together the attributes of complex objects such as fonts or pages within a document.
Most of the Objects found in the package com.icesoft.pdf.pobject.* extend this class. Dictionary objects by convention have a "Type" entry which identifies the type of object the dictionary describes. Classes that extend Dictionary add functionality based on the specified Dictionary type.
| Field Summary | |
protected Hashtable |
entries
Table of associative pairs of objects. |
protected boolean |
inited
Indicates if Dictionary has been initiated. |
protected Library |
library
Pointer to the documents Library object which
acts a central repository for the access of PDF object in the document. |
| Constructor Summary | |
Dictionary(Library l,
Hashtable h)
Creates a new instance of a Dictionary. |
|
| Method Summary | |
Hashtable |
getEntries()
Gets a copy of the entries that make up the Dictionary. |
float |
getFloat(String key)
Gets a float specified by the key in the dictionary
entries. |
int |
getInt(String key)
Gets an int specified by the key in the dictionary
entries. |
Library |
getLibrary()
Gets the PDF Documents Library. |
protected Number |
getNumber(String key)
Gets a Number specified by the key in the dictionary
entries. |
Object |
getObject(String key)
|
Reference |
getPObjectReference()
Gets the reference used to identify this Dictionary in the PDF document. |
void |
init()
Initiate the Dictionary. |
void |
setPObjectReference(Reference reference)
Sets the reference used to identify this Dictionary in the PDF document. |
String |
toString()
Returns a summary of the dictionary entries. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
protected Library library
Library object which
acts a central repository for the access of PDF object in the document.
protected Hashtable entries
protected boolean inited
| Constructor Detail |
public Dictionary(Library l,
Hashtable h)
l - document library.h - dictionary entries.| Method Detail |
public void setPObjectReference(Reference reference)
Sets the reference used to identify this Dictionary in the PDF document. The reference number and generation number of this reference is needed by the encryption algorithm to correctly decrypt this object.
This method should only be used by the PDF Parser. Use of this method outside the context of the PDF Parser may result in unpredictable behavior.
reference - Reference used to identify this Dictionary in the PDF
document.getPObjectReference()public Reference getPObjectReference()
Gets the reference used to identify this Dictionary in the PDF document. The reference number and generation number of this reference is needed by the encryption algorithm to correctly decrypt this object.
setPObjectReference(com.icesoft.pdf.pobjects.Reference)public void init()
public Hashtable getEntries()
public Object getObject(String key)
protected Number getNumber(String key)
key in the dictionary
entries. If the value is a reference, the Number object that the
reference points to is returned. If the key cannot be found,
or the resulting object is not a Number, then null is returned.
key - key to find in entries Hashtable.
public int getInt(String key)
key in the dictionary
entries. If the value is a reference, the int value that the
reference points to is returned.
key - key to find in entries Hashtable.
public float getFloat(String key)
key in the dictionary
entries. If the value is a reference, the float value that the
reference points to is returned.
key - key to find in entries Hashtable.
public Library getLibrary()
public String toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||