Java Doc for STDocument.java in  » PDF » jPod » de » intarsys » pdf » st » 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 » jPod » de.intarsys.pdf.st 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.intarsys.pdf.st.STDocument

STDocument
public class STDocument implements ILocatorSupport(Code)
The most physical abstraction of a PDF document. This object handles the random access representation of the PDF file.

An STDocument manages the cross ref access to data stream positions from COS level objects. As such the ST and the COS package are highly interdependent.



Field Summary
final public static  STDocTypeDOCTYPE_FDF
    
final public static  STDocTypeDOCTYPE_PDF
    
final public static  StringOPTION_WRITEMODEHINT
    

Constructor Summary
protected  STDocument()
     A new empty document.
protected  STDocument(ILocator locator)
     A new document bound to a locator.

Method Summary
public  voidaddChangedReference(COSIndirectObject object)
     Mark object as changed within this document.
public  voidaddObjectReference(COSIndirectObject newRef)
     Add another indirect object to the document.
protected  voidcheckConsistency()
    
public  voidclose()
     Close the document.
public  STDocumentcopyDeep()
     Return a deep copy of the document.
public  COSDictionarycosGetTrailer()
    
public static  STDocumentcreateFromLocator(ILocator locator)
     Create a new document representing the data referenced by locator.
protected static  StringcreateName(String typeName)
    
public static  STDocumentcreateNew()
     create a new empty pdf document.
public static  STDocumentcreateNew(STDocType docType)
     create a new empty document.
public  STXRefSectioncreateNewXRefSection()
    
public  COSObjectKeycreateObjectKey()
     Create a new valid key for use in the document.
protected  IRandomAccesscreateRandomAccess(ILocator pLocator)
     Create a new random access object for the document data.
Parameters:
  pLocator - The locator to the document data.
public  voidgarbageCollect()
     Start a garbage collection for the receiver.
public  ObjectgetAccessLock()
    
public  CollectiongetChanges()
    
public  COSDocumentgetDoc()
    
public  STDocTypegetDocType()
    
public  intgetIncrementalCount()
    
protected  MapgetKeyToObject()
     THe documents objects.
public  COSDictionarygetLinearizedDict()
     The /Linearized dictionary of the document.
public  ILocatorgetLocator()
     THe locator for the document data.
public  StringgetName()
     A name for the document.
public  COSIndirectObjectgetObjectReference(COSObjectKey key)
     The indirect object with object number objNum and generation number genNum is looked up in the document.
public  COSDocumentParsergetParser()
     The parser used for decoding the document data stream.
public  IRandomAccessgetRandomAccess()
     The random access object for the documents data.
public  ISystemSecurityHandlergetSystemSecurityHandler()
    
public  COSTrailergetTrailer()
    
public  StringgetVersion()
    
public  EnumWriteModegetWriteModeHint()
     The write mode to be used when the document is written the next time.
public  STXRefSectiongetXRefSection()
     The most recent STXrefSection of the document.
public  voidincrementalGarbageCollect()
    
protected  voidinitEncryption()
     Load the encryption parameters and initialize the security handler context.
protected  voidinitializeFromLocator()
     Initialize the document from its data.
protected  voidinitializeFromScratch(STDocType pDocType)
    
public  booleanisClosed()
    
public  booleanisDirty()
     true if this has been changed.
public  booleanisEncrypted()
    
public  booleanisLinearized()
     true if this document is linearized.
public  booleanisNew()
    
public  booleanisReadOnly()
     true if this is read only.
public  booleanisStreamed()
     true if this has only streamed xref sections.
public  COSObjectload(COSIndirectObject ref)
     Load a COSObject from the documents data.
protected  COSObjectload(int objectNumber)
    
public  voidloadAll()
    
public  intloadedSize()
     The number of objects currently loaded.
public  Iteratorobjects()
     An iterator on the indirect objects of the storage layer document.
protected  voidopen()
    
public  voidreparseFromLocator()
     Reparses the XREF sections without actually instantiating.
protected  voidreplaceLocator(ILocator newLocator)
     Assign a new locator to the document.
public  voidrestore(ILocator newLocator)
    
public  voidsave()
    
public  voidsave(ILocator pLocator)
    
public  voidsave(ILocator pLocator, Map options)
    
protected  voidsetClosed(boolean closed)
    
public  voidsetDirty(boolean dirty)
     Set the change flag of this.
public  voidsetDoc(COSDocument doc)
    
protected  voidsetDocType(STDocType docType)
    
protected  voidsetLocator(ILocator locator)
    
public  voidsetName(String name)
     Rename the document locally.
protected  voidsetRandomAccess(IRandomAccess randomAccess)
     Assign the IRAndomAccess to the documetns data.
public  voidsetWriteModeHint(EnumWriteMode writeMode)
     The write mode to be used when the document is written the next time.
public  voidsetXRefSection(STXRefSection xRefSection)
     Attach the most recent x ref section to the document.
protected  voidstreamLoad()
    
public  voidupdateModificationDate()
    

Field Detail
DOCTYPE_FDF
final public static STDocType DOCTYPE_FDF(Code)
our current fdf version number *



DOCTYPE_PDF
final public static STDocType DOCTYPE_PDF(Code)
our current pdf version number *



OPTION_WRITEMODEHINT
final public static String OPTION_WRITEMODEHINT(Code)




Constructor Detail
STDocument
protected STDocument()(Code)
A new empty document.

Use always the factory method, this is not completely initialized.




STDocument
protected STDocument(ILocator locator)(Code)
A new document bound to a locator.
Parameters:
  locator - The locator to the documents data.




Method Detail
addChangedReference
public void addChangedReference(COSIndirectObject object)(Code)
Mark object as changed within this document.
Parameters:
  object - The object that is new or changed



addObjectReference
public void addObjectReference(COSIndirectObject newRef)(Code)
Add another indirect object to the document.
Parameters:
  newRef - The new indirect object.



checkConsistency
protected void checkConsistency() throws COSLoadError(Code)



close
public void close() throws IOException(Code)
Close the document. Accessing a documents content is undefined after close.
throws:
  IOException -



copyDeep
public STDocument copyDeep()(Code)
Return a deep copy of the document. This will create a copy of the documents content. The new documents location (random access) is undefined. The objects will not preserve their key values. A deep copy of this.



cosGetTrailer
public COSDictionary cosGetTrailer()(Code)
The documents trailer dictionary The documents trailer dictionary



createFromLocator
public static STDocument createFromLocator(ILocator locator) throws IOException, COSLoadException(Code)
Create a new document representing the data referenced by locator.
Parameters:
  locator - The locator to the documents data A new document representing the data referenced by locator.
throws:
  IOException -
throws:
  COSLoadException -



createName
protected static String createName(String typeName)(Code)



createNew
public static STDocument createNew()(Code)
create a new empty pdf document. A new empty pdf document



createNew
public static STDocument createNew(STDocType docType)(Code)
create a new empty document. A new empty document



createNewXRefSection
public STXRefSection createNewXRefSection()(Code)



createObjectKey
public COSObjectKey createObjectKey()(Code)
Create a new valid key for use in the document. A new valid key for use in the document.



createRandomAccess
protected IRandomAccess createRandomAccess(ILocator pLocator) throws IOException(Code)
Create a new random access object for the document data.
Parameters:
  pLocator - The locator to the document data. Create a new random access object for the document data.
throws:
  IOException -



garbageCollect
public void garbageCollect()(Code)
Start a garbage collection for the receiver. In a garbage collection every indirect object currently unused (unreachable from the catalog) is removed.



getAccessLock
public Object getAccessLock()(Code)



getChanges
public Collection getChanges()(Code)



getDoc
public COSDocument getDoc()(Code)



getDocType
public STDocType getDocType()(Code)



getIncrementalCount
public int getIncrementalCount()(Code)



getKeyToObject
protected Map getKeyToObject()(Code)
THe documents objects. THe documents objects.



getLinearizedDict
public COSDictionary getLinearizedDict()(Code)
The /Linearized dictionary of the document. The /Linearized dictionary is represented by the first entry in the (logically) first XRef section.

Note that this method may NOT return a dictionary even if the document contains a /Linearized dictionary as the first object. This is the case when the document was linearized and was written with an incremental change so that the linearization is obsolete. The valid /Linearized dictionary of the document.




getLocator
public ILocator getLocator()(Code)
THe locator for the document data. THe locator for the document data.



getName
public String getName()(Code)
A name for the document.

This is either a "local" name or the name of the locator reference if present. A name for the document




getObjectReference
public COSIndirectObject getObjectReference(COSObjectKey key)(Code)
The indirect object with object number objNum and generation number genNum is looked up in the document. If the indirect object is not yet available, it is created and registered.
Parameters:
  key - The indirect object with object number objNum and generationnumber genNum



getParser
public COSDocumentParser getParser()(Code)
The parser used for decoding the document data stream. The parser used for decoding the document data stream.



getRandomAccess
public IRandomAccess getRandomAccess()(Code)
The random access object for the documents data. Be aware that using the IRandomAccess after it is closed will throw an IOException. The random access object for the documents data.



getSystemSecurityHandler
public ISystemSecurityHandler getSystemSecurityHandler()(Code)
The documents security handler The documents security handler



getTrailer
public COSTrailer getTrailer()(Code)



getVersion
public String getVersion()(Code)
The version of the PDF spec for this document The version of the PDF spec for this document



getWriteModeHint
public EnumWriteMode getWriteModeHint()(Code)
The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when saving the document. The write mode is reset after each "save". The write mode to be used when the document is written.



getXRefSection
public STXRefSection getXRefSection()(Code)
The most recent STXrefSection of the document. The most recent STXrefSection of the document.



incrementalGarbageCollect
public void incrementalGarbageCollect()(Code)



initEncryption
protected void initEncryption() throws IOException(Code)
Load the encryption parameters and initialize the security handler context.
throws:
  IOException -



initializeFromLocator
protected void initializeFromLocator() throws IOException, COSLoadException(Code)
Initialize the document from its data.
throws:
  IOException -
throws:
  COSLoadException -



initializeFromScratch
protected void initializeFromScratch(STDocType pDocType)(Code)
Initialize a new empty document



isClosed
public boolean isClosed()(Code)



isDirty
public boolean isDirty()(Code)
true if this has been changed. true if this has been changed.



isEncrypted
public boolean isEncrypted()(Code)
if the document has an ISystemSecurityHandler



isLinearized
public boolean isLinearized()(Code)
true if this document is linearized.

When linearized reading is truly implemented, this check should be made using the document length instead for performance reasons. true if this document is linearized.




isNew
public boolean isNew()(Code)



isReadOnly
public boolean isReadOnly()(Code)
true if this is read only. true if this is read only.



isStreamed
public boolean isStreamed()(Code)
true if this has only streamed xref sections. true if this has only streamed xref sections.



load
public COSObject load(COSIndirectObject ref) throws IOException, COSLoadException(Code)
Load a COSObject from the documents data.
Parameters:
  ref - The object reference to be loaded.
throws:
  IOException -
throws:
  COSLoadException -



load
protected COSObject load(int objectNumber) throws IOException, COSLoadException(Code)



loadAll
public void loadAll() throws IOException, COSLoadException(Code)



loadedSize
public int loadedSize()(Code)
The number of objects currently loaded. The number of objects currently loaded.



objects
public Iterator objects()(Code)
An iterator on the indirect objects of the storage layer document. This includes garbage and purely technical objects like x ref streams. An iterator on the indirect objects of the storage layerdocument. This includes garbage and purely technical objects likex ref streams.



open
protected void open() throws IOException(Code)

throws:
  IOException -



reparseFromLocator
public void reparseFromLocator() throws IOException, COSLoadException(Code)
Reparses the XREF sections without actually instantiating. Used for collecting errors on XREF level
throws:
  IOException -
throws:
  COSLoadException -



replaceLocator
protected void replaceLocator(ILocator newLocator) throws IOException(Code)
Assign a new locator to the document.

The documents data is completely copied to the new location.
Parameters:
  newLocator - The new locator for the documents data.
throws:
  IOException -




restore
public void restore(ILocator newLocator) throws IOException, COSLoadException(Code)



save
public void save() throws IOException(Code)



save
public void save(ILocator pLocator) throws IOException(Code)



save
public void save(ILocator pLocator, Map options) throws IOException(Code)



setClosed
protected void setClosed(boolean closed)(Code)



setDirty
public void setDirty(boolean dirty)(Code)
Set the change flag of this.
Parameters:
  dirty - true if this should be marked as changed



setDoc
public void setDoc(COSDocument doc)(Code)



setDocType
protected void setDocType(STDocType docType)(Code)



setLocator
protected void setLocator(ILocator locator)(Code)



setName
public void setName(String name)(Code)
Rename the document locally.

This has no effect if a locator is present.
Parameters:
  name - The new local name of this




setRandomAccess
protected void setRandomAccess(IRandomAccess randomAccess)(Code)
Assign the IRAndomAccess to the documetns data.
Parameters:
  randomAccess - the IRAndomAccess to the documetns data.



setWriteModeHint
public void setWriteModeHint(EnumWriteMode writeMode)(Code)
The write mode to be used when the document is written the next time. If defined this overrides any hint that is used when saving the document. The write mode is reset after each "save".
Parameters:
  writeMode - The write mode to be used when the document is written.



setXRefSection
public void setXRefSection(STXRefSection xRefSection)(Code)
Attach the most recent x ref section to the document.
Parameters:
  xRefSection - The x ref section representing the most recent documentchanges.



streamLoad
protected void streamLoad() throws IOException, COSLoadException(Code)



updateModificationDate
public void updateModificationDate()(Code)



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.