Java Doc for COSDictionary.java in  » PDF » PDFBox-0.7.3 » org » pdfbox » cos » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » PDF » PDFBox 0.7.3 » org.pdfbox.cos 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.pdfbox.cos.COSBase
      org.pdfbox.cos.COSDictionary

All known Subclasses:   org.pdfbox.cos.COSStream,
COSDictionary
public class COSDictionary extends COSBase (Code)
This class represents a dictionary where name/value pairs reside.
author:
   Ben Litchfield
version:
   $Revision: 1.32 $



Constructor Summary
public  COSDictionary()
     Constructor.
public  COSDictionary(COSDictionary dict)
     Copy Constructor.

Method Summary
public  Objectaccept(ICOSVisitor visitor)
     visitor pattern double dispatch method.
Parameters:
  visitor - The object to notify when visiting this object.
public  voidaddAll(COSDictionary dic)
     This will add all of the dictionarys keys/values to this dictionary.
public  voidclear()
     This will clear all items in the map.
public  booleancontainsValue(Object value)
    
See Also:   java.util.Map.containsValue(java.lang.Object)
Parameters:
  value - The value to find in the map.
public  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.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The value returned if the entry is null.
public  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.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The value returned if the entry is null.
public  CalendargetDate(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.
public  CalendargetDate(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.
public  CalendargetDate(String key, Calendar defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be a date.
public  CalendargetDate(COSName key, Calendar defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be a date.
public  COSBasegetDictionaryObject(String key)
     This will get an object from this dictionary.
public  COSBasegetDictionaryObject(String firstKey, String 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. This will get an object from this dictionary.
public  COSBasegetDictionaryObject(String[] keyList)
     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.
public  COSBasegetDictionaryObject(COSName key)
     This will get an object from this dictionary.
public  CalendargetEmbeddedDate(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.
public  CalendargetEmbeddedDate(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.
public  CalendargetEmbeddedDate(String embedded, String key, Calendar defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be a date.
public  CalendargetEmbeddedDate(String embedded, COSName key, Calendar defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be a date.
public  intgetEmbeddedInt(String embeddedDictionary, String key)
     Get an integer from an embedded dictionary.
public  intgetEmbeddedInt(String embeddedDictionary, COSName key)
     Get an integer from an embedded dictionary.
public  intgetEmbeddedInt(String embeddedDictionary, String key, int defaultValue)
     Get an integer from an embedded dictionary.
public  intgetEmbeddedInt(String embeddedDictionary, COSName key, int defaultValue)
     Get an integer from an embedded dictionary.
public  StringgetEmbeddedString(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.
public  StringgetEmbeddedString(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.
public  StringgetEmbeddedString(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.
public  StringgetEmbeddedString(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.
public  floatgetFloat(String key)
     This is a convenience method that will get the dictionary object that is expected to be an int.
public  floatgetFloat(COSName key)
     This is a convenience method that will get the dictionary object that is expected to be an float.
public  floatgetFloat(String key, float defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be a float.
public  floatgetFloat(COSName key, float defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an float.
public  intgetInt(String key)
     This is a convenience method that will get the dictionary object that is expected to be an int.
public  intgetInt(COSName key)
     This is a convenience method that will get the dictionary object that is expected to be an int.
public  intgetInt(String[] keyList, int defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an integer.
public  intgetInt(String key, int defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an integer.
public  intgetInt(COSName key, int defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an integer.
public  COSBasegetItem(COSName key)
     This will do a lookup into the dictionary.
Parameters:
  key - The key to the object.
public  COSNamegetKeyForValue(Object value)
     Search in the map for the value that matches the parameter and return the first key that maps to that value.
Parameters:
  value - The value to search for in the map.
public  longgetLong(String key)
     This is a convenience method that will get the dictionary object that is expected to be an long.
public  longgetLong(COSName key)
     This is a convenience method that will get the dictionary object that is expected to be an long.
public  longgetLong(String[] keyList, long defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an long.
public  longgetLong(String key, long defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an integer.
public  longgetLong(COSName key, long defaultValue)
     This is a convenience method that will get the dictionary object that is expected to be an integer.
public  StringgetNameAsString(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.
public  StringgetNameAsString(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.
public  StringgetNameAsString(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.
public  StringgetNameAsString(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.
public  COSBasegetObjectFromPath(String objPath)
     Nice method, gives you every object you want Arrays works properly too.
public  StringgetString(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.
public  StringgetString(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.
public  StringgetString(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.
public  StringgetString(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.
public  CollectiongetValues()
     This will get all of the values for the dictionary.
public  ListkeyList()
     This will get the keys for all objects in the dictionary in the sequence that they were added.
public  voidmergeInto(COSDictionary dic)
     This will add all of the dictionarys keys/values to this dictionary, but only if they don't already exist.
public  voidremoveItem(COSName key)
     This will remove an item for the dictionary.
public  voidsetBoolean(String key, boolean value)
     This will set an item in the dictionary.
public  voidsetBoolean(COSName key, boolean value)
     This will set an item in the dictionary.
public  voidsetDate(String key, Calendar date)
     Set the value of a date entry in the dictionary.
public  voidsetDate(COSName key, Calendar date)
     Set the date object.
public  voidsetEmbeddedDate(String embedded, String key, Calendar date)
     Set the value of a date entry in the dictionary.
public  voidsetEmbeddedDate(String embedded, COSName key, Calendar date)
     Set the date object.
public  voidsetEmbeddedInt(String embeddedDictionary, String key, int value)
     This is a convenience method that will convert the value to a COSInteger object.
public  voidsetEmbeddedInt(String embeddedDictionary, COSName key, int value)
     This is a convenience method that will convert the value to a COSInteger object.
public  voidsetEmbeddedString(String embedded, String key, String value)
     This is a convenience method that will convert the value to a COSString object.
public  voidsetEmbeddedString(String embedded, COSName key, String value)
     This is a convenience method that will convert the value to a COSString object.
public  voidsetFloat(String key, float value)
     This is a convenience method that will convert the value to a COSFloat object.
public  voidsetFloat(COSName key, float value)
     This is a convenience method that will convert the value to a COSFloat object.
public  voidsetInt(String key, int value)
     This is a convenience method that will convert the value to a COSInteger object.
public  voidsetInt(COSName key, int value)
     This is a convenience method that will convert the value to a COSInteger object.
public  voidsetItem(COSName key, COSBase value)
     This will set an item in the dictionary.
public  voidsetItem(COSName key, COSObjectable value)
     This will set an item in the dictionary.
public  voidsetItem(String key, COSObjectable value)
     This will set an item in the dictionary.
public  voidsetItem(String key, COSBase value)
     This will set an item in the dictionary.
public  voidsetLong(String key, long value)
     This is a convenience method that will convert the value to a COSInteger object.
public  voidsetLong(COSName key, long value)
     This is a convenience method that will convert the value to a COSInteger object.
public  voidsetName(String key, String value)
     This is a convenience method that will convert the value to a COSName object.
public  voidsetName(COSName key, String value)
     This is a convenience method that will convert the value to a COSName object.
public  voidsetString(String key, String value)
     This is a convenience method that will convert the value to a COSString object.
public  voidsetString(COSName key, String value)
     This is a convenience method that will convert the value to a COSString object.
public  intsize()
     This will return the number of elements in this dictionary.


Constructor Detail
COSDictionary
public COSDictionary()(Code)
Constructor.



COSDictionary
public COSDictionary(COSDictionary dict)(Code)
Copy Constructor. This will make a shallow copy of this dictionary.
Parameters:
  dict - The dictionary to copy.




Method Detail
accept
public Object accept(ICOSVisitor visitor) throws COSVisitorException(Code)
visitor pattern double dispatch method.
Parameters:
  visitor - The object to notify when visiting this object. The object that the visitor returns.
throws:
  COSVisitorException - If there is an error visiting this object.



addAll
public void addAll(COSDictionary dic)(Code)
This will add all of the dictionarys keys/values to this dictionary.
Parameters:
  dic - The dic to get the keys from.



clear
public void clear()(Code)
This will clear all items in the map.



containsValue
public boolean containsValue(Object value)(Code)

See Also:   java.util.Map.containsValue(java.lang.Object)
Parameters:
  value - The value to find in the map. true if the map contains this value.



getBoolean
public boolean getBoolean(String key, boolean defaultValue)(Code)
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.
Parameters:
  defaultValue - The value returned if the entry is null. The value converted to a boolean.



getBoolean
public boolean getBoolean(COSName key, boolean defaultValue)(Code)
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.
Parameters:
  defaultValue - The value returned if the entry is null. The entry converted to a boolean.



getDate
public Calendar getDate(String key) throws IOException(Code)
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. The name converted to a string.
throws:
  IOException - If there is an error converting to a date.



getDate
public Calendar getDate(COSName key) throws IOException(Code)
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. The name converted to a string.
throws:
  IOException - If there is an error converting to a date.



getDate
public Calendar getDate(String key, Calendar defaultValue) throws IOException(Code)
This is a convenience method that will get the dictionary object that is expected to be a date. Null is returned if the entry does not exist in the dictionary.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The default value to return. The name converted to a string.
throws:
  IOException - If there is an error converting to a date.



getDate
public Calendar getDate(COSName key, Calendar defaultValue) throws IOException(Code)
This is a convenience method that will get the dictionary object that is expected to be a date. Null is returned if the entry does not exist in the dictionary.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The default value to return. The name converted to a string.
throws:
  IOException - If there is an error converting to a date.



getDictionaryObject
public COSBase getDictionaryObject(String key)(Code)
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. The object that matches the key.



getDictionaryObject
public COSBase getDictionaryObject(String firstKey, String secondKey)(Code)
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.
Parameters:
  secondKey - The second key to try. The object that matches the key.



getDictionaryObject
public COSBase getDictionaryObject(String[] keyList)(Code)
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. The object that matches the key.



getDictionaryObject
public COSBase getDictionaryObject(COSName key)(Code)
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. The object that matches the key.



getEmbeddedDate
public Calendar getEmbeddedDate(String embedded, String key) throws IOException(Code)
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.
Parameters:
  key - The key to the item in the dictionary. 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) throws IOException(Code)
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.
Parameters:
  key - The key to the item in the dictionary. 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(Code)
This is a convenience method that will get the dictionary object that is expected to be a date. Null is returned if the entry does not exist in the dictionary.
Parameters:
  embedded - The embedded dictionary to get.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The default value to return. 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(Code)
This is a convenience method that will get the dictionary object that is expected to be a date. Null is returned if the entry does not exist in the dictionary.
Parameters:
  embedded - The embedded dictionary to get.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The default value to return. The name converted to a string.
throws:
  IOException - If there is an error converting to a date.



getEmbeddedInt
public int getEmbeddedInt(String embeddedDictionary, String key)(Code)
Get an integer from an embedded dictionary. Useful for 1-1 mappings. default:-1
Parameters:
  embeddedDictionary - The name of the embedded dictionary.
Parameters:
  key - The key in the embedded dictionary. The value of the embedded integer.



getEmbeddedInt
public int getEmbeddedInt(String embeddedDictionary, COSName key)(Code)
Get an integer from an embedded dictionary. Useful for 1-1 mappings. default:-1
Parameters:
  embeddedDictionary - The name of the embedded dictionary.
Parameters:
  key - The key in the embedded dictionary. The value of the embedded integer.



getEmbeddedInt
public int getEmbeddedInt(String embeddedDictionary, String key, int defaultValue)(Code)
Get an integer from an embedded dictionary. Useful for 1-1 mappings.
Parameters:
  embeddedDictionary - The name of the embedded dictionary.
Parameters:
  key - The key in the embedded dictionary.
Parameters:
  defaultValue - The value if there is no embedded dictionary or it does not contain the key. The value of the embedded integer.



getEmbeddedInt
public int getEmbeddedInt(String embeddedDictionary, COSName key, int defaultValue)(Code)
Get an integer from an embedded dictionary. Useful for 1-1 mappings.
Parameters:
  embeddedDictionary - The name of the embedded dictionary.
Parameters:
  key - The key in the embedded dictionary.
Parameters:
  defaultValue - The value if there is no embedded dictionary or it does not contain the key. The value of the embedded integer.



getEmbeddedString
public String getEmbeddedString(String embedded, String key)(Code)
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.
Parameters:
  key - The key to the item in the dictionary. The name converted to a string.



getEmbeddedString
public String getEmbeddedString(String embedded, COSName key)(Code)
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.
Parameters:
  key - The key to the item in the dictionary. The name converted to a string.



getEmbeddedString
public String getEmbeddedString(String embedded, String key, String defaultValue)(Code)
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.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The default value to return. The name converted to a string.



getEmbeddedString
public String getEmbeddedString(String embedded, COSName key, String defaultValue)(Code)
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.
Parameters:
  key - The key to the item in the dictionary.
Parameters:
  defaultValue - The default value to return. The name converted to a string.



getFloat
public float getFloat(String key)(Code)
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. The float value.



getFloat
public float getFloat(COSName key)(Code)
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. The float value.



getFloat
public float getFloat(String key, float defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The float value.



getFloat
public float getFloat(COSName key, float defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The float value.



getInt
public int getInt(String key)(Code)
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. The integer value.



getInt
public int getInt(COSName key)(Code)
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. The integer value..



getInt
public int getInt(String[] keyList, int defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The integer value.



getInt
public int getInt(String key, int defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The integer value.



getInt
public int getInt(COSName key, int defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The integer value.



getItem
public COSBase getItem(COSName key)(Code)
This will do a lookup into the dictionary.
Parameters:
  key - The key to the object. The item that matches the key.



getKeyForValue
public COSName getKeyForValue(Object value)(Code)
Search in the map for the value that matches the parameter and return the first key that maps to that value.
Parameters:
  value - The value to search for in the map. The key for the value in the map or null if it does not exist.



getLong
public long getLong(String key)(Code)
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. The long value.



getLong
public long getLong(COSName key)(Code)
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. The long value.



getLong
public long getLong(String[] keyList, long defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The long value.



getLong
public long getLong(String key, long defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The integer value.



getLong
public long getLong(COSName key, long defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The integer value.



getNameAsString
public String getNameAsString(String key)(Code)
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. The name converted to a string.



getNameAsString
public String getNameAsString(COSName key)(Code)
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. The name converted to a string.



getNameAsString
public String getNameAsString(String key, String defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The name converted to a string.



getNameAsString
public String getNameAsString(COSName key, String defaultValue)(Code)
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.
Parameters:
  defaultValue - The value to return if the dictionary item is null. The name converted to a string.



getObjectFromPath
public COSBase getObjectFromPath(String objPath)(Code)
Nice method, gives you every object you want Arrays works properly too. Try "P/Annots/[k]/Rect" where k means the index of the Annotsarray.
Parameters:
  objPath - the relative path to the object. the object



getString
public String getString(String key)(Code)
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. The name converted to a string.



getString
public String getString(COSName key)(Code)
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. The name converted to a string.



getString
public String getString(String key, String defaultValue)(Code)
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.
Parameters:
  defaultValue - The default value to return. The name converted to a string.



getString
public String getString(COSName key, String defaultValue)(Code)
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.
Parameters:
  defaultValue - The default value to return. The name converted to a string.



getValues
public Collection getValues()(Code)
This will get all of the values for the dictionary. All the values for the dictionary.



keyList
public List keyList()(Code)
This will get the keys for all objects in the dictionary in the sequence that they were added. a list of the keys in the sequence of insertion



mergeInto
public void mergeInto(COSDictionary dic)(Code)
This will add all of the dictionarys 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 dic to get the keys from.



removeItem
public void removeItem(COSName key)(Code)
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.



setBoolean
public void setBoolean(String key, boolean value)(Code)
This will set an item in the dictionary.
Parameters:
  key - The key to the dictionary object.
Parameters:
  value - The value to the dictionary object.



setBoolean
public void setBoolean(COSName key, boolean value)(Code)
This will set an item in the dictionary.
Parameters:
  key - The key to the dictionary object.
Parameters:
  value - The value to the dictionary object.



setDate
public void setDate(String key, Calendar date)(Code)
Set the value of a date entry in the dictionary.
Parameters:
  key - The key to the date value.
Parameters:
  date - The date value.



setDate
public void setDate(COSName key, Calendar date)(Code)
Set the date object.
Parameters:
  key - The key to the date.
Parameters:
  date - The date to set.



setEmbeddedDate
public void setEmbeddedDate(String embedded, String key, Calendar date)(Code)
Set the value of a date entry in the dictionary.
Parameters:
  embedded - The embedded dictionary.
Parameters:
  key - The key to the date value.
Parameters:
  date - The date value.



setEmbeddedDate
public void setEmbeddedDate(String embedded, COSName key, Calendar date)(Code)
Set the date object.
Parameters:
  embedded - The embedded dictionary.
Parameters:
  key - The key to the date.
Parameters:
  date - The date to set.



setEmbeddedInt
public void setEmbeddedInt(String embeddedDictionary, String key, int value)(Code)
This is a convenience method that will convert the value to a COSInteger object.
Parameters:
  embeddedDictionary - The embedded dictionary.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setEmbeddedInt
public void setEmbeddedInt(String embeddedDictionary, COSName key, int value)(Code)
This is a convenience method that will convert the value to a COSInteger object.
Parameters:
  embeddedDictionary - The embedded dictionary.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setEmbeddedString
public void setEmbeddedString(String embedded, String key, String value)(Code)
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.
Parameters:
  key - The key to the object,
Parameters:
  value - The string value for the name.



setEmbeddedString
public void setEmbeddedString(String embedded, COSName key, String value)(Code)
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.
Parameters:
  key - The key to the object,
Parameters:
  value - The string value for the name.



setFloat
public void setFloat(String key, float value)(Code)
This is a convenience method that will convert the value to a COSFloat object.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setFloat
public void setFloat(COSName key, float value)(Code)
This is a convenience method that will convert the value to a COSFloat object.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setInt
public void setInt(String key, int value)(Code)
This is a convenience method that will convert the value to a COSInteger object.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setInt
public void setInt(COSName key, int value)(Code)
This is a convenience method that will convert the value to a COSInteger object.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setItem
public void setItem(COSName key, COSBase value)(Code)
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.
Parameters:
  value - The value to the dictionary object.



setItem
public void setItem(COSName key, COSObjectable value)(Code)
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.
Parameters:
  value - The value to the dictionary object.



setItem
public void setItem(String key, COSObjectable value)(Code)
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.
Parameters:
  value - The value to the dictionary object.



setItem
public void setItem(String key, COSBase value)(Code)
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.
Parameters:
  value - The value to the dictionary object.



setLong
public void setLong(String key, long value)(Code)
This is a convenience method that will convert the value to a COSInteger object.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setLong
public void setLong(COSName key, long value)(Code)
This is a convenience method that will convert the value to a COSInteger object.
Parameters:
  key - The key to the object,
Parameters:
  value - The int value for the name.



setName
public void setName(String key, String value)(Code)
This is a convenience method that will convert the value to a COSName object. If it is null then the object will be removed.
Parameters:
  key - The key to the object,
Parameters:
  value - The string value for the name.



setName
public void setName(COSName key, String value)(Code)
This is a convenience method that will convert the value to a COSName object. If it is null then the object will be removed.
Parameters:
  key - The key to the object,
Parameters:
  value - The string value for the name.



setString
public void setString(String key, String value)(Code)
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:
  key - The key to the object,
Parameters:
  value - The string value for the name.



setString
public void setString(COSName key, String value)(Code)
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:
  key - The key to the object,
Parameters:
  value - The string value for the name.



size
public int size()(Code)
This will return the number of elements in this dictionary. The number of elements in the dictionary.



Methods inherited from org.pdfbox.cos.COSBase
abstract public Object accept(ICOSVisitor visitor) throws COSVisitorException(Code)(Java Doc)
public COSBase getCOSObject()(Code)(Java Doc)
public FilterManager getFilterManager()(Code)(Java Doc)

Methods inherited from java.lang.Object
native protected Object clone() throws CloneNotSupportedException(Code)(Java Doc)
public boolean equals(Object obj)(Code)(Java Doc)
protected void finalize() throws Throwable(Code)(Java Doc)
final native public Class getClass()(Code)(Java Doc)
native public int hashCode()(Code)(Java Doc)
final native public void notify()(Code)(Java Doc)
final native public void notifyAll()(Code)(Java Doc)
public String toString()(Code)(Java Doc)
final native public void wait(long timeout) throws InterruptedException(Code)(Java Doc)
final public void wait(long timeout, int nanos) throws InterruptedException(Code)(Java Doc)
final public void wait() throws InterruptedException(Code)(Java Doc)

www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.