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


java.lang.Object
   de.intarsys.pdf.writer.COSWriter

COSWriter
public class COSWriter implements ICOSObjectVisitor,ICOSProxyVisitor(Code)
A writer for PDF related data structures.


Field Summary
final public static  byte[]ARRAY_CLOSE
    
final public static  byte[]ARRAY_OPEN
    
final public static  byte[]COMMENT
    
final public static  byte[]CRLF
     To be used when 2 byte sequence is enforced.
final public static  byte[]DICT_CLOSE
    
final public static  byte[]DICT_OPEN
    
final protected static  char[]DIGITS
    
final public static  byte[]ENDOBJ
    
final public static  byte[]ENDSTREAM
    
final public static  byte[]EOF
    
final public static  byte[]EOL
    
final public static  byte[]FALSE
    
final public static  byte[]GARBAGE
    
final public static  byte[]LF
     Line feed character.
final public static  byte[]LITERAL_ESCAPED_BS
    
final public static  byte[]LITERAL_ESCAPED_CR
    
final public static  byte[]LITERAL_ESCAPED_FF
    
final public static  byte[]LITERAL_ESCAPED_HT
    
final public static  byte[]LITERAL_ESCAPED_LF
    
final public static  byte[]NAME_ESCAPE
    
final public static  byte[]NAME_PREFIX
    
final public static  byte[]NULL
    
final public static  byte[]OBJ
    
final public static  byte[]PDF_ESCAPE
    
final public static  byte[]REFERENCE
    
final public static  byte[]SPACE
    
final public static  byte[]STREAM
    
final public static  byte[]STRING_CLOSE
    
final public static  byte[]STRING_HEX_CLOSE
    
final public static  byte[]STRING_HEX_OPEN
    
final public static  byte[]STRING_OPEN
    
final public static  byte[]TRAILER
    
final public static  byte[]TRUE
    

Constructor Summary
public  COSWriter(IRandomAccess randomAccess, ISystemSecurityHandler securityHandler)
    

Method Summary
protected  voidbasicWriteDocument(STDocument doc)
    
public static  voidbasicWriteFixed(IRandomAccess randomAccess, float value, int precision)
    
public static  voidbasicWriteInteger(IRandomAccess randomAccess, int value)
    
public static  voidbasicWriteName(IRandomAccess randomAccess, byte[] name)
    
public static  voidbasicWriteStringHex(IRandomAccess randomAccess, byte[] string)
    
public static  voidbasicWriteStringLiteral(IRandomAccess randomAccess, byte[] string)
    
protected  voidclose(STDocument doc)
    
protected  byte[]encryptStream(COSDictionary dict, byte[] bytes)
    
protected  byte[]encryptString(byte[] bytes)
    
protected  COSIndirectObjectgetCurrentObject()
    
public  ListgetProxies()
     The collection of proxies to COSObjects visited by the writer.
public  IRandomAccessgetRandomAccess()
    
protected  ISystemSecurityHandlergetSecurityHandler()
    
public  booleanisIncremental()
    
protected  booleanisOnNewLine()
     This will tell if we are on a new line.
protected  voidreset()
    
public  voidseekToEnd()
    
protected  voidsetCurrentObject(COSIndirectObject currentObject)
    
public  voidsetIncremental(boolean incremental)
    
final public static  byte[]toByteArray(COSObject object)
     Create a byte array representation from a COSObject.
Parameters:
  object - The object to be serialized.
public  ObjectvisitFromArray(COSArray obj)
     visitFromArray.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromBoolean(COSBoolean obj)
     visitFromBoolean.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromDictionary(COSDictionary obj)
     visitFromDictionary.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromFixed(COSFixed obj)
     visitFromFixed.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromIndirectObject(COSIndirectObject obj)
    
public  ObjectvisitFromInteger(COSInteger obj)
     visitFromInteger.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromName(COSName obj)
     visitFromName.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromNull(COSNull obj)
     visitFromNull.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromProxy(COSObjectProxy obj)
    
public  ObjectvisitFromStream(COSStream obj)
     visitFromStream.
Parameters:
  obj - The object that is being visited.
public  ObjectvisitFromString(COSString obj)
     visitFromString.
Parameters:
  obj - The object that is being visited.
public  voidwrite(byte[] b)
     This will write some byte to the stream.
public  voidwrite(byte[] b, int off, int len)
     This will write some byte to the stream.
public  voidwrite(int b)
     This will write a single byte to the stream.
protected  voidwriteCRLF()
    
public  voidwriteContentStream(CSContent contentStream)
    
public  voidwriteDocument(STDocument doc)
    
protected  voidwriteEOF()
    
public  voidwriteEOL()
     This will write an EOL to the stream.
protected  voidwriteEntry(STXRefSection xrefSection, COSIndirectObject object)
    
protected  voidwriteHeader(STDocument stdoc)
     This will write the header to the PDF document.
protected  voidwriteImageData(COSString imageData)
    
public  voidwriteIndirectObject(COSIndirectObject object)
    
public  voidwriteObject(COSObject object)
    
protected  voidwriteOperation(CSOperation obj)
    
protected  voidwriteStreamContent(byte[] bytes)
    
protected  voidwriteStringHex(byte[] bytes)
    
protected  voidwriteStringLiteral(byte[] bytes)
    
protected  voidwriteXRef(STXRefSection xrefSection)
    

Field Detail
ARRAY_CLOSE
final public static byte[] ARRAY_CLOSE(Code)



ARRAY_OPEN
final public static byte[] ARRAY_OPEN(Code)



COMMENT
final public static byte[] COMMENT(Code)



CRLF
final public static byte[] CRLF(Code)
To be used when 2 byte sequence is enforced.



DICT_CLOSE
final public static byte[] DICT_CLOSE(Code)



DICT_OPEN
final public static byte[] DICT_OPEN(Code)



DIGITS
final protected static char[] DIGITS(Code)
a fast lookup for serializing digits



ENDOBJ
final public static byte[] ENDOBJ(Code)



ENDSTREAM
final public static byte[] ENDSTREAM(Code)



EOF
final public static byte[] EOF(Code)



EOL
final public static byte[] EOL(Code)
standard line separator on this platform



FALSE
final public static byte[] FALSE(Code)



GARBAGE
final public static byte[] GARBAGE(Code)



LF
final public static byte[] LF(Code)
Line feed character.



LITERAL_ESCAPED_BS
final public static byte[] LITERAL_ESCAPED_BS(Code)



LITERAL_ESCAPED_CR
final public static byte[] LITERAL_ESCAPED_CR(Code)



LITERAL_ESCAPED_FF
final public static byte[] LITERAL_ESCAPED_FF(Code)



LITERAL_ESCAPED_HT
final public static byte[] LITERAL_ESCAPED_HT(Code)



LITERAL_ESCAPED_LF
final public static byte[] LITERAL_ESCAPED_LF(Code)



NAME_ESCAPE
final public static byte[] NAME_ESCAPE(Code)



NAME_PREFIX
final public static byte[] NAME_PREFIX(Code)



NULL
final public static byte[] NULL(Code)



OBJ
final public static byte[] OBJ(Code)



PDF_ESCAPE
final public static byte[] PDF_ESCAPE(Code)



REFERENCE
final public static byte[] REFERENCE(Code)



SPACE
final public static byte[] SPACE(Code)



STREAM
final public static byte[] STREAM(Code)



STRING_CLOSE
final public static byte[] STRING_CLOSE(Code)



STRING_HEX_CLOSE
final public static byte[] STRING_HEX_CLOSE(Code)



STRING_HEX_OPEN
final public static byte[] STRING_HEX_OPEN(Code)



STRING_OPEN
final public static byte[] STRING_OPEN(Code)



TRAILER
final public static byte[] TRAILER(Code)



TRUE
final public static byte[] TRUE(Code)




Constructor Detail
COSWriter
public COSWriter(IRandomAccess randomAccess, ISystemSecurityHandler securityHandler)(Code)




Method Detail
basicWriteDocument
protected void basicWriteDocument(STDocument doc) throws IOException(Code)



basicWriteFixed
public static void basicWriteFixed(IRandomAccess randomAccess, float value, int precision) throws IOException(Code)



basicWriteInteger
public static void basicWriteInteger(IRandomAccess randomAccess, int value) throws IOException(Code)



basicWriteName
public static void basicWriteName(IRandomAccess randomAccess, byte[] name) throws IOException(Code)
create the byte stream for the representation of a name
Parameters:
  randomAccess - the randomAccessData to write to
Parameters:
  name - the names byte stream
throws:
  IOException -



basicWriteStringHex
public static void basicWriteStringHex(IRandomAccess randomAccess, byte[] string) throws IOException(Code)
create a hex encoded byte stream representation of string
Parameters:
  randomAccess - the randomAccessData to write to
Parameters:
  string - the string to write
throws:
  IOException -



basicWriteStringLiteral
public static void basicWriteStringLiteral(IRandomAccess randomAccess, byte[] string) throws IOException(Code)
create the literal byte stream representation of string
Parameters:
  randomAccess - the randomAccessData to write to
Parameters:
  string - the string to write
throws:
  IOException -



close
protected void close(STDocument doc) throws IOException(Code)



encryptStream
protected byte[] encryptStream(COSDictionary dict, byte[] bytes) throws IOException(Code)



encryptString
protected byte[] encryptString(byte[] bytes) throws IOException(Code)



getCurrentObject
protected COSIndirectObject getCurrentObject()(Code)



getProxies
public List getProxies()(Code)
The collection of proxies to COSObjects visited by the writer. The collection of proxies to COSObjects visited by the writer.



getRandomAccess
public IRandomAccess getRandomAccess()(Code)



getSecurityHandler
protected ISystemSecurityHandler getSecurityHandler()(Code)



isIncremental
public boolean isIncremental()(Code)



isOnNewLine
protected boolean isOnNewLine()(Code)
This will tell if we are on a new line. true If we are on a new line.



reset
protected void reset()(Code)



seekToEnd
public void seekToEnd() throws IOException(Code)



setCurrentObject
protected void setCurrentObject(COSIndirectObject currentObject)(Code)



setIncremental
public void setIncremental(boolean incremental)(Code)



toByteArray
final public static byte[] toByteArray(COSObject object)(Code)
Create a byte array representation from a COSObject.
Parameters:
  object - The object to be serialized. A byte array representation from a COSObject.



visitFromArray
public Object visitFromArray(COSArray obj) throws COSVisitorException(Code)
visitFromArray.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromBoolean
public Object visitFromBoolean(COSBoolean obj) throws COSVisitorException(Code)
visitFromBoolean.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromDictionary
public Object visitFromDictionary(COSDictionary obj) throws COSVisitorException(Code)
visitFromDictionary.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromFixed
public Object visitFromFixed(COSFixed obj) throws COSVisitorException(Code)
visitFromFixed.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromIndirectObject
public Object visitFromIndirectObject(COSIndirectObject obj) throws COSVisitorException(Code)
This will write an indirect object reference
Parameters:
  obj - The indirect object to write.
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromInteger
public Object visitFromInteger(COSInteger obj) throws COSVisitorException(Code)
visitFromInteger.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromName
public Object visitFromName(COSName obj) throws COSVisitorException(Code)
visitFromName.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromNull
public Object visitFromNull(COSNull obj) throws COSVisitorException(Code)
visitFromNull.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromProxy
public Object visitFromProxy(COSObjectProxy obj) throws COSVisitorException(Code)



visitFromStream
public Object visitFromStream(COSStream obj) throws COSVisitorException(Code)
visitFromStream.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



visitFromString
public Object visitFromString(COSString obj) throws COSVisitorException(Code)
visitFromString.
Parameters:
  obj - The object that is being visited. unused
throws:
  COSVisitorException - If there is an exception while visiting this object.



write
public void write(byte[] b) throws IOException(Code)
This will write some byte to the stream.
Parameters:
  b - The source byte array.
throws:
  IOException - If the underlying stream throws an exception.



write
public void write(byte[] b, int off, int len) throws IOException(Code)
This will write some byte to the stream.
Parameters:
  b - The source byte array.
Parameters:
  off - The offset into the array to start writing.
Parameters:
  len - The number of bytes to write.
throws:
  IOException - If the underlying stream throws an exception.



write
public void write(int b) throws IOException(Code)
This will write a single byte to the stream.
Parameters:
  b - The byte to write to the stream.
throws:
  IOException - If there is an error writing to the underlying stream.



writeCRLF
protected void writeCRLF() throws IOException(Code)
This will write a CRLF to the stream
throws:
  IOException - If there is an error writing the data to the stream.



writeContentStream
public void writeContentStream(CSContent contentStream) throws IOException(Code)



writeDocument
public void writeDocument(STDocument doc) throws IOException(Code)



writeEOF
protected void writeEOF() throws IOException(Code)



writeEOL
public void writeEOL() throws IOException(Code)
This will write an EOL to the stream.
throws:
  IOException - If there is an error writing to the stream



writeEntry
protected void writeEntry(STXRefSection xrefSection, COSIndirectObject object) throws IOException(Code)



writeHeader
protected void writeHeader(STDocument stdoc) throws IOException(Code)
This will write the header to the PDF document.
throws:
  IOException - If there is an error writing to the stream.



writeImageData
protected void writeImageData(COSString imageData) throws IOException(Code)



writeIndirectObject
public void writeIndirectObject(COSIndirectObject object) throws IOException(Code)



writeObject
public void writeObject(COSObject object) throws IOException(Code)
This will write a cos object to the stream
Parameters:
  object - the object to write
throws:
  IOException - If an error occurs while generating the data.



writeOperation
protected void writeOperation(CSOperation obj) throws COSVisitorException, IOException(Code)



writeStreamContent
protected void writeStreamContent(byte[] bytes) throws IOException(Code)



writeStringHex
protected void writeStringHex(byte[] bytes) throws IOException(Code)



writeStringLiteral
protected void writeStringLiteral(byte[] bytes) throws IOException(Code)



writeXRef
protected void writeXRef(STXRefSection xrefSection) throws IOException(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.