public class CosDictionary extends CosContainer
DIRECT, INDIRECT, t_Array, t_Boolean, t_Dictionary, t_KeyAbsent, t_Name, t_Null, t_Numeric, t_ObjectRef, t_Stream, t_String| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all entries from the CosDictionary.
|
boolean |
containsKey(Object key)
Returns whether this dictionary contains an entry for the given key
|
CosDictionary |
copy()
Returns a "direct" dictionary object with all the direct objects cloned but
keys and indirect objects are not cloned.
|
boolean |
equals(CosObject value)
This method checks the inside key-value pairs of CosDictionary and returns true if they have same number of
key-value pairs and also equal data for each key.
|
CosObject |
get(ASName key)
Obtains the object corresponding to the specified key.
|
Boolean |
getBoolean(ASName key)
Accesor function to get the scalar value from the object associated
with a given key.
|
CosArray |
getCosArray(ASName key)
Accesor function to get the array value from the object associated
with a given key.
|
CosDictionary |
getCosDictionary(ASName key)
Accesor function to get the dictionary value from the object associated
with a given key.
|
CosStream |
getCosStream(ASName key)
Accesor function to get the stream value from the object associated
with a given key.
|
CosString |
getCosString(ASName key)
Accesor function to get the scalar value from the object associated
with a given key.
|
Double |
getDouble(ASName key)
Accesor function to get the scalar value from the object associated
with a given key.
|
CosObject |
getInheritable(ASName name,
ASName parentKey)
Obtains the object corresponding to the specified key.
|
Integer |
getInt(ASName key)
Accesor function to get the scalar value from the object associated
with a given key.
|
ASName |
getKeyForValue(CosObject value)
Returns key corresponding to the value passed here.
|
List<ASName> |
getKeys()
Returns the list of keys of this dictionary.
|
Long |
getLong(ASName key)
Accesor function to get the scalar value from the object associated
with a given key.
|
ASName |
getName(ASName key)
Accesor functions to get the scalar value from the object associated
with a given key.
|
InputByteStream |
getStream(ASName key)
Accesor function to get the decoded stream value from the object associated
with a given key.
|
ASString |
getString(ASName key)
Accesor function to get the scalar value from the object associated
with a given key.
|
int |
getType()
return the type of this CosObject
|
int |
getType(ASName key)
Returns the type of the value associated with the given key
|
Object |
getValue() |
CosContainerValuesIterator |
getValuesIterator() |
boolean |
isEmpty()
Indicates whether the dictionary has any entries.
|
boolean |
isInvalidDict()
Only for Internal Engineering Use.
|
Iterator<ASName> |
keyIterator()
Returns an iterator over keys of this dictionary.
|
Set<ASName> |
keySet()
Returns the key set of this dictionary.
|
CosObject |
put(ASName key,
ASName value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
ASName[] value) |
CosObject |
put(ASName key,
ASString value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
boolean value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
boolean[] value)
Put an array of boolean into a Dictionary under the given ASName key.
|
CosObject |
put(ASName key,
CosObject cosObject)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
double value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
double[] value)
Put an array of double into a Dictionary under the given ASName key.
|
CosObject |
put(ASName key,
int value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
int[] value)
Put an array of int into a Dictionary under the given ASName key.
|
CosObject |
put(ASName key,
long value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
long[] value)
Put an array of long into a Dictionary under the given ASName key.
|
CosObject |
put(ASName key,
String value)
Places the key/value pair into the dictionary.
|
CosObject |
put(ASName key,
String[] value)
Put an array of string into a Dictionary under the given ASName key.
|
CosObject |
remove(ASName key)
Removes the key mapping from the dictionary.
|
void |
setEncryptionState(boolean state)
Set the specified encryption state for all strings and streams in a dictionary recursively
|
void |
setRepairedValue(ASName key,
CosObject cosObject)
Set the repaired value for this cos dictionary.
|
int |
size()
Returns the number of key/value pairs in the dictionary.
|
List<CosObject> |
values()
Returns a list of values in this dictionary.
|
findObjPos, markNotDirtybooleanValue, doubleValue, equals, getDocument, getObjEOF, getObjGen, getObjNum, getObjPos, getObjRevision, getStreamManager, hexStringValue, intValue, isCompressed, isDirty, isIndirect, longValue, nameValue, numberValue, stringValue, textValue, toStringpublic boolean isInvalidDict()
public CosDictionary copy() throws PDFCosParseException, PDFIOException, PDFSecurityException
public int getType()
public boolean isEmpty()
public int size()
public boolean containsKey(Object key)
key - public void setEncryptionState(boolean state)
throws PDFCosParseException,
PDFIOException,
PDFSecurityException
public CosObject get(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
key - A key in the dictionaryPDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic int getType(ASName key)
key - public ASName getName(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public Boolean getBoolean(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public Double getDouble(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public Integer getInt(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public Long getLong(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public ASString getString(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosString getCosString(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosArray getCosArray(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosDictionary getCosDictionary(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosStream getCosStream(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public InputByteStream getStream(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
public void setRepairedValue(ASName key, CosObject cosObject)
key - cosObject - public CosObject put(ASName key, CosObject cosObject) throws PDFCosParseException, PDFIOException, PDFSecurityException
key - Key for the entrycosObject - CosObject value for the entryPDFIOExceptionPDFCosParseExceptionPDFSecurityExceptionpublic CosObject put(ASName key, ASName value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, boolean value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, double value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, long value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, int value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, ASString value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, String value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, double[] value) throws PDFCosParseException, PDFIOException, PDFSecurityException
key - value - an array of valuesPDFIOExceptionPDFCosParseExceptionPDFSecurityExceptionpublic CosObject put(ASName key, long[] value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, ASName[] value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, int[] value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, String[] value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public CosObject put(ASName key, boolean[] value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public void clear()
throws PDFCosParseException,
PDFIOException,
PDFSecurityException
public CosObject remove(ASName key) throws PDFCosParseException, PDFIOException, PDFSecurityException
key - Key mapping to removePDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic CosContainerValuesIterator getValuesIterator()
getValuesIterator in class CosContainerpublic Object getValue() throws PDFCosParseException, PDFIOException, PDFSecurityException
getValue in class CosObjectPDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionpublic ASName getKeyForValue(CosObject value) throws PDFCosParseException, PDFIOException, PDFSecurityException
public boolean equals(CosObject value)
public CosObject getInheritable(ASName name, ASName parentKey) throws PDFCosParseException, PDFIOException, PDFSecurityException
name - A key in the dictionaryparentKey - The key that specifies the "parent" dictionaryPDFCosParseExceptionPDFIOExceptionPDFSecurityExceptionCopyright © 2010 - 2020 Adobe. All Rights Reserved