Java Doc for COSDocument.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.COSDocument

COSDocument
public class COSDocument extends COSBase (Code)
This is the in-memory representation of the PDF document. You need to call close() on this object when you are done using it!!
author:
   Ben Litchfield
version:
   $Revision: 1.28 $



Constructor Summary
public  COSDocument()
     Constructor.
public  COSDocument(File scratchDir)
     Constructor that will create a create a scratch file in the following directory.
public  COSDocument(RandomAccess file)
     Constructor that will use the following random access file for storage of the PDF streams.

Method Summary
public  Objectaccept(ICOSVisitor visitor)
     visitor pattern double dispatch method.
Parameters:
  visitor - The object to notify when visiting this object.
public  COSObjectaddObject(COSObject obj)
     This will add an object to this document. the method checks if obj is already present as there may be cyclic dependencies
Parameters:
  obj - The object to add to the document.
public  voidclose()
     This will close all storage and delete the tmp files.
public  voiddereferenceObjectStreams()
     This method will search the list of objects for types of ObjStm.
protected  voidfinalize()
     The sole purpose of this is to inform a client of PDFBox that they did not close the document.
public  COSObjectgetCatalog()
     This will get the document catalog.
public  COSArraygetDocumentID()
     This will get the document ID.
public  COSDictionarygetEncryptionDictionary()
     This will get the encryption dictionary if the document is encrypted or null if the document is not encrypted.
public  StringgetHeaderString()
    
public  COSObjectgetObjectByType(String type)
     This will get the first dictionary object by type.
Parameters:
  type - The type of the object.
public  COSObjectgetObjectByType(COSName type)
     This will get the first dictionary object by type.
Parameters:
  type - The type of the object.
public  COSObjectgetObjectFromPool(COSObjectKey key)
     This will get an object from the pool.
Parameters:
  key - The object key.
public  ListgetObjects()
     This will get a list of all available objects.
public  ListgetObjectsByType(String type)
     This will get all dictionary objects by type.
Parameters:
  type - The type of the object.
public  ListgetObjectsByType(COSName type)
     This will get a dictionary object by type.
Parameters:
  type - The type of the object.
public  RandomAccessgetScratchFile()
     This will get the scratch file for this document.
public  COSDictionarygetTrailer()
     This will get the document trailer.
public  floatgetVersion()
     This will get the version of this PDF document.
public  booleanisEncrypted()
     This will tell if this is an encrypted document.
public  voidprint()
     This will print contents to stdout.
public  voidsetDocumentID(COSArray id)
     This will set the document ID.
public  voidsetEncryptionDictionary(COSDictionary encDictionary)
     This will set the encryption dictionary, this should only be called when encypting the document.
public  voidsetHeaderString(String header)
    
public  voidsetTrailer(COSDictionary newTrailer)
     // MIT added, maybe this should not be supported as trailer is a persistence construct.
public  voidsetVersion(float versionValue)
     This will set the version of this PDF document.


Constructor Detail
COSDocument
public COSDocument() throws IOException(Code)
Constructor. Uses the java.io.tmpdir value to create a file to store the streams.
throws:
  IOException - If there is an error creating the tmp file.



COSDocument
public COSDocument(File scratchDir) throws IOException(Code)
Constructor that will create a create a scratch file in the following directory.
Parameters:
  scratchDir - The directory to store a scratch file.
throws:
  IOException - If there is an error creating the tmp file.



COSDocument
public COSDocument(RandomAccess file)(Code)
Constructor that will use the following random access file for storage of the PDF streams. The client of this method is responsible for deleting the storage if necessary that this file will write to. The close method will close the file though.
Parameters:
  file - The random access file to use for storage.




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. any object, depending on the visitor implementation, or null
throws:
  COSVisitorException - If an error occurs while visiting this object.



addObject
public COSObject addObject(COSObject obj) throws IOException(Code)
This will add an object to this document. the method checks if obj is already present as there may be cyclic dependencies
Parameters:
  obj - The object to add to the document. The object that was actually added to this document, if an object reference already existed then that will be returned.
throws:
  IOException - If there is an error adding the object.



close
public void close() throws IOException(Code)
This will close all storage and delete the tmp files.
throws:
  IOException - If there is an error close resources.



dereferenceObjectStreams
public void dereferenceObjectStreams() throws IOException(Code)
This method will search the list of objects for types of ObjStm. If it finds them then it will parse out all of the objects from the stream that is contains.
throws:
  IOException - If there is an error parsing the stream.



finalize
protected void finalize()(Code)
The sole purpose of this is to inform a client of PDFBox that they did not close the document.



getCatalog
public COSObject getCatalog() throws IOException(Code)
This will get the document catalog. Maybe this should move to an object at PDFEdit level catalog is the root of all document activities
throws:
  IOException - If no catalog can be found.



getDocumentID
public COSArray getDocumentID()(Code)
This will get the document ID. The document id.



getEncryptionDictionary
public COSDictionary getEncryptionDictionary()(Code)
This will get the encryption dictionary if the document is encrypted or null if the document is not encrypted. The encryption dictionary.



getHeaderString
public String getHeaderString()(Code)
Returns the headerString.



getObjectByType
public COSObject getObjectByType(String type)(Code)
This will get the first dictionary object by type.
Parameters:
  type - The type of the object. This will return an object with the specified type.



getObjectByType
public COSObject getObjectByType(COSName type)(Code)
This will get the first dictionary object by type.
Parameters:
  type - The type of the object. This will return an object with the specified type.



getObjectFromPool
public COSObject getObjectFromPool(COSObjectKey key) throws IOException(Code)
This will get an object from the pool.
Parameters:
  key - The object key. The object in the pool or a new one if it has not been parsed yet.
throws:
  IOException - If there is an error getting the proxy object.



getObjects
public List getObjects()(Code)
This will get a list of all available objects. A list of all objects.



getObjectsByType
public List getObjectsByType(String type)(Code)
This will get all dictionary objects by type.
Parameters:
  type - The type of the object. This will return an object with the specified type.



getObjectsByType
public List getObjectsByType(COSName type)(Code)
This will get a dictionary object by type.
Parameters:
  type - The type of the object. This will return an object with the specified type.



getScratchFile
public RandomAccess getScratchFile()(Code)
This will get the scratch file for this document. The scratch file.



getTrailer
public COSDictionary getTrailer()(Code)
This will get the document trailer. the document trailer dict



getVersion
public float getVersion()(Code)
This will get the version of this PDF document. This documents version.



isEncrypted
public boolean isEncrypted()(Code)
This will tell if this is an encrypted document. true If this document is encrypted.



print
public void print()(Code)
This will print contents to stdout.



setDocumentID
public void setDocumentID(COSArray id)(Code)
This will set the document ID.
Parameters:
  id - The document id.



setEncryptionDictionary
public void setEncryptionDictionary(COSDictionary encDictionary)(Code)
This will set the encryption dictionary, this should only be called when encypting the document.
Parameters:
  encDictionary - The encryption dictionary.



setHeaderString
public void setHeaderString(String header)(Code)

Parameters:
  header - The headerString to set.



setTrailer
public void setTrailer(COSDictionary newTrailer)(Code)
// MIT added, maybe this should not be supported as trailer is a persistence construct. This will set the document trailer.
Parameters:
  newTrailer - the document trailer dictionary



setVersion
public void setVersion(float versionValue)(Code)
This will set the version of this PDF document.
Parameters:
  versionValue - The version of the PDF document.



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.