|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.icesoft.pdf.util.Library
The Library class acts a central repository for the access
of PDF objects in a document. The Library class has many utility methods
which are designed to access PDF objects as easily as possible. The
Library class has direct access to the PDF file and loads the
needed objects from the file system when needed.
| Field Summary | |
CacheManager |
cacheManager
|
MemoryManager |
memoryManager
|
SecurityManager |
securityManager
|
| Constructor Summary | |
Library()
Creates a new instance of a Library. |
|
| Method Summary | |
void |
addObject(Object object,
Reference objectReference)
Adds a PDF object and its respective object reference to the library. |
void |
dispose()
Dispose the library's resources. |
Boolean |
getBoolean(Hashtable dictionaryEntries,
String key)
Gets a Boolean specified by the key in the dictionary
entries. |
CacheManager |
getCacheManager()
Gets the library cache manager. |
Catalog |
getCatalog()
Gets the document's catalog. |
Hashtable |
getDictionary(Hashtable dictionaryEntries,
String key)
Gets a dictionary specified by the key in the dictionary
entries. |
float |
getFloat(Hashtable dictionaryEntries,
String key)
Gets a float specified by the key in the dictionary
entries. |
ICCBased |
getICCBased(Reference ref)
The Reference is to the Stream from which the ICC color space data is to be parsed. |
int |
getInt(Hashtable dictionaryEntries,
String key)
Gets an int specified by the key in the dictionary
entries. |
long |
getLong(Hashtable dictionaryEntries,
String key)
Gets a float specified by the key in the dictionary
entries. |
String |
getName(Hashtable dictionaryEntries,
String key)
Gets a Name specified by the key in the dictionary
entries. |
Number |
getNumber(Hashtable dictionaryEntries,
String key)
Gets a Number specified by the key in the dictionary
entries. |
Object |
getObject(Hashtable dictionaryEntries,
String key)
Gets the PDF object specified by the key in the dictionary
entries. |
Object |
getObject(Object referenceObject)
Gets the PDF object that the referenceObject references. |
Object |
getObject(Reference reference)
Gets the object specified by the reference. |
Reference |
getObjectReference(Hashtable dictionaryEntries,
String key)
Gets the PDF object specified by the key in the dictionary
entries. |
Rectangle2D.Float |
getRectangle(Hashtable dictionaryEntries,
String key)
Gets a rectangle specified by the key. |
Resources |
getResources(Hashtable dictionaryEntries,
String key)
|
Resources |
getResources(Reference reference)
|
SecurityManager |
getSecurityManager()
Gets the document's security manger. |
PTrailer |
getTrailerByFilePosition(long position)
Gets the document's trailer. |
boolean |
isEncrypted()
Indicates that document is encrypted using Adobe Standard Encryption. |
boolean |
isValidEntry(Hashtable dictionaryEntries,
String key)
Tests if the given key will return a non-null PDF object from the specified dictionary entries. |
boolean |
isValidEntry(Reference reference)
Tests if there exists a cross-reference entry for this reference. |
void |
setCatalog(Catalog c)
Sets the document's catalog. |
void |
setEncrypted(boolean flag)
Set the document is encrypted flag. |
void |
setLazyObjectLoader(LazyObjectLoader lol)
Sets a document loader for the library. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public MemoryManager memoryManager
public CacheManager cacheManager
public SecurityManager securityManager
| Constructor Detail |
public Library()
| Method Detail |
public void setLazyObjectLoader(LazyObjectLoader lol)
lol - loader object.public PTrailer getTrailerByFilePosition(long position)
position - byte offset of the trailer in the PDF file.
public Object getObject(Reference reference)
reference - reference to a PDF object in the document structure.
public Object getObject(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the object that the reference
points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
getObjectReference(java.util.Hashtable, String)public Object getObject(Object referenceObject)
referenceObject references.
referenceObject - reference object.
referenceObject references. If
referenceObject is not an instance of a Reference, the
origional referenceObject is returned.
public boolean isValidEntry(Hashtable dictionaryEntries,
String key)
dictionaryEntries - dictionary entrieskey - dictionary key
public boolean isValidEntry(Reference reference)
reference - reference to a PDF object in the document structure.
public Number getNumber(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the Number object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public Boolean getBoolean(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the Boolean object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public float getFloat(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public int getInt(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public long getLong(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public String getName(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the Name object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public Hashtable getDictionary(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference, the dictionary object that the
reference points to is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public Rectangle2D.Float getRectangle(Hashtable dictionaryEntries,
String key)
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
public ICCBased getICCBased(Reference ref)
ref - Reference to Stream containing ICC color space data
public Resources getResources(Hashtable dictionaryEntries,
String key)
public Resources getResources(Reference reference)
public void addObject(Object object,
Reference objectReference)
object - PDF object to add.objectReference - PDF object reference object.
public Reference getObjectReference(Hashtable dictionaryEntries,
String key)
key in the dictionary
entries. If the key value is a reference it is returned.
dictionaryEntries - the dictionary entries to look up the key in.key - string value representing the dictionary key.
getObject(java.util.Hashtable, String)public boolean isEncrypted()
public SecurityManager getSecurityManager()
public void setEncrypted(boolean flag)
flag - true, if the document is encrypted; false, otherwize.public CacheManager getCacheManager()
public Catalog getCatalog()
public void setCatalog(Catalog c)
c - document catalog object.public void dispose()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||