Class COSDictionary
java.lang.Object
org.apache.pdfbox.cos.COSBase
org.apache.pdfbox.cos.COSDictionary
- All Implemented Interfaces:
COSUpdateInfo, COSObjectable
- Direct Known Subclasses:
COSStream
This class represents a dictionary where name/value pairs reside.
- Author:
- Ben Litchfield
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaccept(ICOSVisitor visitor) visitor pattern double dispatch method.voidaddAll(COSDictionary dict) This will add all of the dictionaries keys/values to this dictionary.Returns an unmodifiable view of this dictionary.voidclear()This will clear all items in the map.booleancontainsKey(String name) booleancontainsKey(COSName name) booleancontainsValue(Object value) entrySet()Returns the name-value entries in this dictionary.booleangetBoolean(String key, boolean defaultValue) This is a convenience method that will get the dictionary object that is expected to be a cos boolean and convert it to a primitive boolean.booleangetBoolean(COSName key, boolean defaultValue) This is a convenience method that will get the dictionary object that is expected to be a COSBoolean and convert it to a primitive boolean.booleangetBoolean(COSName firstKey, COSName secondKey, boolean defaultValue) This is a convenience method that will get the dictionary object that is expected to be a COSBoolean and convert it to a primitive boolean.getCOSArray(COSName key) This is a convenience method that will get the dictionary object that is expected to be a COSArray.getCOSDictionary(COSName key) This is a convenience method that will get the dictionary object that is expected to be a COSDictionary.getCOSName(COSName key) This is a convenience method that will get the dictionary object that is expected to be a name.getCOSName(COSName key, COSName defaultValue) This is a convenience method that will get the dictionary object that is expected to be a name.getCOSObject(COSName key) This is a convenience method that will get the dictionary object that is expected to be a COSObject.getCOSStream(COSName key) This is a convenience method that will get the dictionary object that is expected to be a COSStream.This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.This is a convenience method that will get the dictionary object that is expected to be a date.This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.This is a convenience method that will get the dictionary object that is expected to be a date.This will get an object from this dictionary.getDictionaryObject(String[] keyList) Deprecated.Will be removed in 3.0.This will get an object from this dictionary.getDictionaryObject(COSName firstKey, COSName secondKey) This is a special case of getDictionaryObject that takes multiple keys, it will handle the situation where multiple keys could get the same value, ie if either CS or ColorSpace is used to get the colorspace.getEmbeddedDate(String embedded, String key) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getEmbeddedDate(String embedded, String key, Calendar defaultValue) This is a convenience method that will get the dictionary object that is expected to be a date.getEmbeddedDate(String embedded, COSName key) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getEmbeddedDate(String embedded, COSName key, Calendar defaultValue) This is a convenience method that will get the dictionary object that is expected to be a date.intgetEmbeddedInt(String embeddedDictionary, String key) Get an integer from an embedded dictionary.intgetEmbeddedInt(String embeddedDictionary, String key, int defaultValue) Get an integer from an embedded dictionary.intgetEmbeddedInt(String embeddedDictionary, COSName key) Get an integer from an embedded dictionary.intgetEmbeddedInt(String embeddedDictionary, COSName key, int defaultValue) Get an integer from an embedded dictionary.getEmbeddedString(String embedded, String key) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getEmbeddedString(String embedded, String key, String defaultValue) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getEmbeddedString(String embedded, COSName key) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getEmbeddedString(String embedded, COSName key, String defaultValue) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.booleanGets the boolean value from the flags at the given bit position.floatThis is a convenience method that will get the dictionary object that is expected to be an float.floatThis is a convenience method that will get the dictionary object that is expected to be a float.floatThis is a convenience method that will get the dictionary object that is expected to be an float.floatThis is a convenience method that will get the dictionary object that is expected to be an float.intThis is a convenience method that will get the dictionary object that is expected to be an int.intDeprecated.Will be removed in 3.0.intThis is a convenience method that will get the dictionary object that is expected to be an integer.intThis is a convenience method that will get the dictionary object that is expected to be an int.intThis is a convenience method that will get the dictionary object that is expected to be an integer.intThis is a convenience method that will get the dictionary object that is expected to be an integer.intThis is a convenience method that will get the dictionary object that is expected to be an integer.This will do a lookup into the dictionary.This will do a lookup into the dictionary.This is a special case of getItem that takes multiple keys, it will handle the situation where multiple keys could get the same value, ie if either CS or ColorSpace is used to get the colorspace.getKeyForValue(Object value) Search in the map for the value that matches the parameter and return the first key that maps to that value.longThis is a convenience method that will get the dictionary object that is expected to be an long.longDeprecated.Will be removed in 3.0.longThis is a convenience method that will get the dictionary object that is expected to be an integer.longThis is a convenience method that will get the dictionary object that is expected to be an long.longThis is a convenience method that will get the dictionary object that is expected to be an integer.getNameAsString(String key) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getNameAsString(String key, String defaultValue) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getNameAsString(COSName key) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getNameAsString(COSName key, String defaultValue) This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.getObjectFromPath(String objPath) Nice method, gives you every object you want Arrays works properly too.This is a convenience method that will get the dictionary object that is expected to be a string.This is a convenience method that will get the dictionary object that is expected to be a string.This is a convenience method that will get the dictionary object that is expected to be a string.This is a convenience method that will get the dictionary object that is expected to be a string.This will get all of the values for the dictionary.booleanGet the update state for the COSWriter.keySet()Returns the names of the entries in this dictionary.voidmergeInto(COSDictionary dic) Deprecated.This method should no longer be used and will be removed in 3.0 because it could also merge attributes that should not be merged (filter and length) in a COSStream.voidremoveItem(COSName key) This will remove an item for the dictionary.voidsetBoolean(String key, boolean value) This will set an item in the dictionary.voidsetBoolean(COSName key, boolean value) This will set an item in the dictionary.voidSet the value of a date entry in the dictionary.voidSet the date object.voidsetEmbeddedDate(String embedded, String key, Calendar date) Set the value of a date entry in the dictionary.voidsetEmbeddedDate(String embedded, COSName key, Calendar date) Set the date object.voidsetEmbeddedInt(String embeddedDictionary, String key, int value) This is a convenience method that will convert the value to a COSInteger object.voidsetEmbeddedInt(String embeddedDictionary, COSName key, int value) This is a convenience method that will convert the value to a COSInteger object.voidsetEmbeddedString(String embedded, String key, String value) This is a convenience method that will convert the value to a COSString object.voidsetEmbeddedString(String embedded, COSName key, String value) This is a convenience method that will convert the value to a COSString object.voidSets the given boolean value at bitPos in the flags.voidThis is a convenience method that will convert the value to a COSFloat object.voidThis is a convenience method that will convert the value to a COSFloat object.voidThis is a convenience method that will convert the value to a COSInteger object.voidThis is a convenience method that will convert the value to a COSInteger object.voidThis will set an item in the dictionary.voidsetItem(String key, COSObjectable value) This will set an item in the dictionary.voidThis will set an item in the dictionary.voidsetItem(COSName key, COSObjectable value) This will set an item in the dictionary.voidThis is a convenience method that will convert the value to a COSInteger object.voidThis is a convenience method that will convert the value to a COSInteger object.voidThis is a convenience method that will convert the value to a COSName object.voidThis is a convenience method that will convert the value to a COSName object.voidsetNeedToBeUpdated(boolean flag) Set the update state of the dictionary for the COSWriter.voidThis is a convenience method that will convert the value to a COSString object.voidThis is a convenience method that will convert the value to a COSString object.intsize()This will return the number of elements in this dictionary.toString()Methods inherited from class COSBase
getCOSObject, isDirect, setDirect
-
Field Details
-
items
-
-
Constructor Details
-
COSDictionary
public COSDictionary()Constructor. -
COSDictionary
Copy Constructor. This will make a shallow copy of this dictionary.- Parameters:
dict- The dictionary to copy.
-
-
Method Details
-
containsValue
- Parameters:
value- The value to find in the map.- Returns:
- true if the map contains this value.
- See Also:
-
getKeyForValue
-
size
public int size()This will return the number of elements in this dictionary.- Returns:
- The number of elements in the dictionary.
-
clear
public void clear()This will clear all items in the map. -
getDictionaryObject
This will get an object from this dictionary. If the object is a reference then it will dereference it and get it from the document. If the object is COSNull then null will be returned.- Parameters:
key- The key to the object that we are getting.- Returns:
- The object that matches the key.
-
getDictionaryObject
This is a special case of getDictionaryObject that takes multiple keys, it will handle the situation where multiple keys could get the same value, ie if either CS or ColorSpace is used to get the colorspace. This will get an object from this dictionary. If the object is a reference then it will dereference it and get it from the document. If the object is COSNull then null will be returned.- Parameters:
firstKey- The first key to try.secondKey- The second key to try.- Returns:
- The object that matches the key.
-
getDictionaryObject
Deprecated.Will be removed in 3.0. A value may have to keys, the regular one and sometimes an additional abbreviation. More than 2 values doesn't make sense.This is a special case of getDictionaryObject that takes multiple keys, it will handle the situation where multiple keys could get the same value, ie if either CS or ColorSpace is used to get the colorspace. This will get an object from this dictionary. If the object is a reference then it will dereference it and get it from the document. If the object is COSNull then null will be returned.- Parameters:
keyList- The list of keys to find a value.- Returns:
- The object that matches the key.
-
getDictionaryObject
This will get an object from this dictionary. If the object is a reference then it will dereference it and get it from the document. If the object is COSNull then null will be returned.- Parameters:
key- The key to the object that we are getting.- Returns:
- The object that matches the key.
-
setItem
-
setItem
This will set an item in the dictionary. If value is null then the result will be the same as removeItem( key ).- Parameters:
key- The key to the dictionary object.value- The value to the dictionary object.
-
setItem
This will set an item in the dictionary. If value is null then the result will be the same as removeItem( key ).- Parameters:
key- The key to the dictionary object.value- The value to the dictionary object.
-
setBoolean
This will set an item in the dictionary.- Parameters:
key- The key to the dictionary object.value- The value to the dictionary object.
-
setBoolean
This will set an item in the dictionary.- Parameters:
key- The key to the dictionary object.value- The value to the dictionary object.
-
setItem
-
setName
-
setName
-
setDate
-
setDate
-
setEmbeddedDate
-
setEmbeddedDate
-
setString
-
setString
-
setEmbeddedString
This is a convenience method that will convert the value to a COSString object. If it is null then the object will be removed.- Parameters:
embedded- The embedded dictionary to set the item in.key- The key to the object,value- The string value for the name.
-
setEmbeddedString
This is a convenience method that will convert the value to a COSString object. If it is null then the object will be removed.- Parameters:
embedded- The embedded dictionary to set the item in.key- The key to the object,value- The string value for the name.
-
setInt
This is a convenience method that will convert the value to a COSInteger object.- Parameters:
key- The key to the object,value- The int value for the name.
-
setInt
This is a convenience method that will convert the value to a COSInteger object.- Parameters:
key- The key to the object,value- The int value for the name.
-
setLong
This is a convenience method that will convert the value to a COSInteger object.- Parameters:
key- The key to the object,value- The int value for the name.
-
setLong
This is a convenience method that will convert the value to a COSInteger object.- Parameters:
key- The key to the object,value- The int value for the name.
-
setEmbeddedInt
-
setEmbeddedInt
-
setFloat
This is a convenience method that will convert the value to a COSFloat object.- Parameters:
key- The key to the object,value- The int value for the name.
-
setFloat
This is a convenience method that will convert the value to a COSFloat object.- Parameters:
key- The key to the object,value- The int value for the name.
-
setFlag
Sets the given boolean value at bitPos in the flags.- Parameters:
field- The COSName of the field to set the value into.bitFlag- the bit position to set the value in.value- the value the bit position should have.
-
getCOSName
-
getCOSObject
-
getCOSDictionary
This is a convenience method that will get the dictionary object that is expected to be a COSDictionary. Null is returned if the entry does not exist in the dictionary.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The COSDictionary.
-
getCOSStream
-
getCOSArray
-
getCOSName
This is a convenience method that will get the dictionary object that is expected to be a name. Default is returned if the entry does not exist in the dictionary.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The COS name.
-
getNameAsString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The name converted to a string.
-
getNameAsString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The name converted to a string.
-
getNameAsString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The name converted to a string.
-
getNameAsString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The name converted to a string.
-
getString
-
getString
-
getString
-
getString
-
getEmbeddedString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary.- Parameters:
embedded- The embedded dictionary.key- The key to the item in the dictionary.- Returns:
- The name converted to a string.
-
getEmbeddedString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary.- Parameters:
embedded- The embedded dictionary.key- The key to the item in the dictionary.- Returns:
- The name converted to a string.
-
getEmbeddedString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.- Parameters:
embedded- The embedded dictionary.key- The key to the item in the dictionary.defaultValue- The default value to return.- Returns:
- The name converted to a string.
-
getEmbeddedString
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string.- Parameters:
embedded- The embedded dictionary.key- The key to the item in the dictionary.defaultValue- The default value to return.- Returns:
- The name converted to a string.
-
getDate
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary or if the date was invalid.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The name converted to a date.
-
getDate
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary or if the date was invalid.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The name converted to a date.
-
getDate
This is a convenience method that will get the dictionary object that is expected to be a date.- Parameters:
key- The key to the item in the dictionary.defaultValue- The default value to return if the entry does not exist in the dictionary or if the date was invalid.- Returns:
- The name converted to a date.
-
getDate
This is a convenience method that will get the dictionary object that is expected to be a date.- Parameters:
key- The key to the item in the dictionary.defaultValue- The default value to return if the entry does not exist in the dictionary or if the date was invalid.- Returns:
- The name converted to a date.
-
getEmbeddedDate
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary.- Parameters:
embedded- The embedded dictionary to get.key- The key to the item in the dictionary.- Returns:
- The name converted to a string.
- Throws:
IOException- If there is an error converting to a date.
-
getEmbeddedDate
This is a convenience method that will get the dictionary object that is expected to be a name and convert it to a string. Null is returned if the entry does not exist in the dictionary.- Parameters:
embedded- The embedded dictionary to get.key- The key to the item in the dictionary.- Returns:
- The name converted to a string.
- Throws:
IOException- If there is an error converting to a date.
-
getEmbeddedDate
public Calendar getEmbeddedDate(String embedded, String key, Calendar defaultValue) throws IOException This is a convenience method that will get the dictionary object that is expected to be a date.- Parameters:
embedded- The embedded dictionary to get.key- The key to the item in the dictionary.defaultValue- The default value to return if the entry does not exist in the dictionary or if the date was invalid.- Returns:
- The name converted to a string.
- Throws:
IOException- If there is an error converting to a date.
-
getEmbeddedDate
public Calendar getEmbeddedDate(String embedded, COSName key, Calendar defaultValue) throws IOException This is a convenience method that will get the dictionary object that is expected to be a date.- Parameters:
embedded- The embedded dictionary to get.key- The key to the item in the dictionary.defaultValue- The default value to return if the entry does not exist in the dictionary or if the date was invalid.- Returns:
- The name converted to a string.
- Throws:
IOException- If there is an error converting to a date.
-
getBoolean
This is a convenience method that will get the dictionary object that is expected to be a cos boolean and convert it to a primitive boolean.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value returned if the entry is null.- Returns:
- The value converted to a boolean.
-
getBoolean
This is a convenience method that will get the dictionary object that is expected to be a COSBoolean and convert it to a primitive boolean.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value returned if the entry is null.- Returns:
- The entry converted to a boolean.
-
getBoolean
This is a convenience method that will get the dictionary object that is expected to be a COSBoolean and convert it to a primitive boolean.- Parameters:
firstKey- The first key to the item in the dictionary.secondKey- The second key to the item in the dictionary.defaultValue- The value returned if the entry is null.- Returns:
- The entry converted to a boolean.
-
getEmbeddedInt
Get an integer from an embedded dictionary. Useful for 1-1 mappings. default:-1- Parameters:
embeddedDictionary- The name of the embedded dictionary.key- The key in the embedded dictionary.- Returns:
- The value of the embedded integer.
-
getEmbeddedInt
Get an integer from an embedded dictionary. Useful for 1-1 mappings. default:-1- Parameters:
embeddedDictionary- The name of the embedded dictionary.key- The key in the embedded dictionary.- Returns:
- The value of the embedded integer.
-
getEmbeddedInt
Get an integer from an embedded dictionary. Useful for 1-1 mappings.- Parameters:
embeddedDictionary- The name of the embedded dictionary.key- The key in the embedded dictionary.defaultValue- The value if there is no embedded dictionary or it does not contain the key.- Returns:
- The value of the embedded integer.
-
getEmbeddedInt
Get an integer from an embedded dictionary. Useful for 1-1 mappings.- Parameters:
embeddedDictionary- The name of the embedded dictionary.key- The key in the embedded dictionary.defaultValue- The value if there is no embedded dictionary or it does not contain the key.- Returns:
- The value of the embedded integer.
-
getInt
This is a convenience method that will get the dictionary object that is expected to be an int. -1 is returned if there is no value.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The integer value.
-
getInt
This is a convenience method that will get the dictionary object that is expected to be an int. -1 is returned if there is no value.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The integer value..
-
getInt
Deprecated.Will be removed in 3.0. A value may have to keys, the regular one and sometimes an additional abbreviation. More than 2 values doesn't make sense.This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value will be returned.- Parameters:
keyList- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The integer value.
-
getInt
This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value will be returned.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The integer value.
-
getInt
This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value will be returned.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The integer value.
-
getInt
This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value -1 will be returned.- Parameters:
firstKey- The first key to the item in the dictionary.secondKey- The second key to the item in the dictionary.- Returns:
- The integer value.
-
getInt
This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value will be returned.- Parameters:
firstKey- The first key to the item in the dictionary.secondKey- The second key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The integer value.
-
getLong
This is a convenience method that will get the dictionary object that is expected to be an long. -1 is returned if there is no value.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The long value.
-
getLong
This is a convenience method that will get the dictionary object that is expected to be an long. -1 is returned if there is no value.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The long value.
-
getLong
Deprecated.Will be removed in 3.0. A value may have to keys, the regular one and sometimes an additional abbreviation. More than 2 values doesn't make sense.This is a convenience method that will get the dictionary object that is expected to be an long. If the dictionary value is null then the default value will be returned.- Parameters:
keyList- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The long value.
-
getLong
This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value will be returned.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The integer value.
-
getLong
This is a convenience method that will get the dictionary object that is expected to be an integer. If the dictionary value is null then the default value will be returned.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The integer value.
-
getFloat
This is a convenience method that will get the dictionary object that is expected to be an float. -1 is returned if there is no value.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The float value.
-
getFloat
This is a convenience method that will get the dictionary object that is expected to be an float. -1 is returned if there is no value.- Parameters:
key- The key to the item in the dictionary.- Returns:
- The float value.
-
getFloat
This is a convenience method that will get the dictionary object that is expected to be a float. If the dictionary value is null then the default value will be returned.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The float value.
-
getFloat
This is a convenience method that will get the dictionary object that is expected to be an float. If the dictionary value is null then the default value will be returned.- Parameters:
key- The key to the item in the dictionary.defaultValue- The value to return if the dictionary item is null.- Returns:
- The float value.
-
getFlag
Gets the boolean value from the flags at the given bit position.- Parameters:
field- The COSName of the field to get the flag from.bitFlag- the bitPosition to get the value from.- Returns:
- true if the number at bitPos is '1'
-
removeItem
This will remove an item for the dictionary. This will do nothing of the object does not exist.- Parameters:
key- The key to the item to remove from the dictionary.
-
getItem
-
getItem
-
getItem
This is a special case of getItem that takes multiple keys, it will handle the situation where multiple keys could get the same value, ie if either CS or ColorSpace is used to get the colorspace. This will get an object from this dictionary.- Parameters:
firstKey- The first key to try.secondKey- The second key to try.- Returns:
- The object that matches the key.
-
keySet
-
entrySet
-
getValues
This will get all of the values for the dictionary.- Returns:
- All the values for the dictionary.
-
accept
visitor pattern double dispatch method.- Specified by:
acceptin classCOSBase- Parameters:
visitor- The object to notify when visiting this object.- Returns:
- The object that the visitor returns.
- Throws:
IOException- If there is an error visiting this object.
-
isNeedToBeUpdated
public boolean isNeedToBeUpdated()Description copied from interface:COSUpdateInfoGet the update state for the COSWriter. This indicates whether an object is to be written when there is an incremental save.- Specified by:
isNeedToBeUpdatedin interfaceCOSUpdateInfo- Returns:
- the update state.
-
setNeedToBeUpdated
public void setNeedToBeUpdated(boolean flag) Description copied from interface:COSUpdateInfoSet the update state of the dictionary for the COSWriter. This indicates whether an object is to be written when there is an incremental save.- Specified by:
setNeedToBeUpdatedin interfaceCOSUpdateInfo- Parameters:
flag- the update state.
-
addAll
This will add all of the dictionaries keys/values to this dictionary. Existing key/value pairs will be overwritten.- Parameters:
dict- The dictionaries to get the key/value pairs from.
-
containsKey
- Parameters:
name- The key to find in the map.- Returns:
- true if the map contains this key.
- See Also:
-
containsKey
- Parameters:
name- The key to find in the map.- Returns:
- true if the map contains this key.
- See Also:
-
mergeInto
Deprecated.This method should no longer be used and will be removed in 3.0 because it could also merge attributes that should not be merged (filter and length) in a COSStream.This will add all of the dictionaries keys/values to this dictionary, but only if they don't already exist. If a key already exists in this dictionary then nothing is changed.- Parameters:
dic- The dictionaries to get the keys from.
-
getObjectFromPath
-
asUnmodifiableDictionary
Returns an unmodifiable view of this dictionary.- Returns:
- an unmodifiable view of this dictionary
-
toString
-