Java Doc for EncodingSerializer.java in  » Content-Management-System » apache-lenya-2.0 » org » apache » cocoon » components » serializers » 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 » Content Management System » apache lenya 2.0 » org.apache.cocoon.components.serializers 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.apache.cocoon.components.serializers.EncodingSerializer

All known Subclasses:   org.apache.cocoon.components.serializers.XMLSerializer,
EncodingSerializer
abstract public class EncodingSerializer implements Serializer,Locator,Recyclable,Configurable(Code)

An abstract serializer supporting multiple encodings.

This serializer can accept the following configuration whenever it is declared into a sitemap:

 <serializer class="org.apache.cocoon.components.serializers..." ... >
 <encoding>myencoding</encoding>
 <indent>myindenting</indent>
 </serializer>
 

The value indicated by myencoding must be replaced with a valid charset encoding (this serializer does not rely on the JVM for character encoding, you can look into the cocoon-serializers-charsets JAR file for a list).

The value indicated by myindenting will control the indenting level for each element.


version:
   CVS $Id: EncodingSerializer.java 433543 2006-08-22 06:22:54Z crossley $



Field Summary
final public static  intATTRIBUTE_LENGTH
     The length of the array of strings representing an attribute.
final public static  intATTRIBUTE_LOCAL
     The position of the local name in the attributes array.
final public static  intATTRIBUTE_NSURI
     The position of the namespace URI in the attributes array.
final public static  intATTRIBUTE_QNAME
     The position of the qualified name in the attributes array.
final public static  intATTRIBUTE_VALUE
     The position of the value in the attributes array.
protected  Charsetcharset
     The Charset associated with the character encoding.
protected  intindentPerLevel
    
protected  Namespacesnamespaces
     The Namespace associated with this instance.

Constructor Summary
protected  EncodingSerializer(Encoder encoder)
    

Method Summary
abstract public  voidbody(String uri, String local, String qual)
     Receive notification of the beginning of the document body.
public  voidcharacters(char ch, int start, int length)
    
abstract public  voidcharactersImpl(char ch, int start, int length)
    
public  voidconfigure(Configuration conf)
     Set the configurations for this serializer.
protected  voidencode(String data)
    
protected  voidencode(char data)
     Encode and write an array of characters.
protected  voidencode(char data, int start, int length)
     Encode and write a specific part of an array of characters.
public  voidendDocument()
     Receive notification of the end of a document.
public  voidendElement(String nsuri, String local, String qual)
     Receive notification of the end of an element.
abstract public  voidendElementImpl(String uri, String local, String qual)
     Receive notification of the end of an element.
public  voidendPrefixMapping(String prefix)
     End the scope of a prefix-URI mapping.
protected  voidflush()
     Flush the stream.
public  intgetColumnNumber()
     Return the column number where the current document event ends.
public  intgetLineNumber()
     Return the line number where the current document event ends.
protected  StringgetLocation()
     Return a String describing the current location.
public  StringgetPublicId()
     Return the public identifier for the current document event.
public  StringgetSystemId()
     Return the system identifier for the current document event.
public  voidrecycle()
     Reset this EncodingSerializer.
final public  voidsetDocumentLocator(Locator locator)
     Receive an object for locating the origin of SAX document events.
public  voidsetOutputStream(OutputStream out)
     Set the OutputStream where this serializer will write data to.
public  booleanshouldSetContentLength()
     Test if the component wants to set the content length.
public  voidstartDocument()
     Receive notification of the beginning of a document.
public  voidstartElement(String nsuri, String local, String qual, Attributes attributes)
     Receive notification of the beginning of an element.
abstract public  voidstartElementImpl(String uri, String local, String qual, String namespaces, String attributes)
     Receive notification of the beginning of an element.
public  voidstartPrefixMapping(String prefix, String uri)
     Begin the scope of a prefix-URI Namespace mapping.
protected  voidwrite(char data)
     Write an array of characters.
protected  voidwrite(char data, int start, int length)
     Write a portion of an array of characters.
protected  voidwrite(int c)
     Write a single character.
protected  voidwrite(String data)
     Write a string.
protected  voidwrite(String data, int start, int length)
     Write a portion of a string.
protected  voidwriteIndent(int indent)
    
protected  voidwriteln()
     Write a end-of-line character.
protected  voidwriteln(String data)
     Write a string and a end-of-line character.

Field Detail
ATTRIBUTE_LENGTH
final public static int ATTRIBUTE_LENGTH(Code)
The length of the array of strings representing an attribute.



ATTRIBUTE_LOCAL
final public static int ATTRIBUTE_LOCAL(Code)
The position of the local name in the attributes array.



ATTRIBUTE_NSURI
final public static int ATTRIBUTE_NSURI(Code)
The position of the namespace URI in the attributes array.



ATTRIBUTE_QNAME
final public static int ATTRIBUTE_QNAME(Code)
The position of the qualified name in the attributes array.



ATTRIBUTE_VALUE
final public static int ATTRIBUTE_VALUE(Code)
The position of the value in the attributes array.



charset
protected Charset charset(Code)
The Charset associated with the character encoding.



indentPerLevel
protected int indentPerLevel(Code)
Per level indent spaces



namespaces
protected Namespaces namespaces(Code)
The Namespace associated with this instance.




Constructor Detail
EncodingSerializer
protected EncodingSerializer(Encoder encoder)(Code)
Create a new instance of this EncodingSerializer




Method Detail
body
abstract public void body(String uri, String local, String qual) throws SAXException(Code)
Receive notification of the beginning of the document body.
Parameters:
  uri - The namespace URI of the root element.
Parameters:
  local - The local name of the root element.
Parameters:
  qual - The fully-qualified name of the root element.



characters
public void characters(char ch, int start, int length) throws SAXException(Code)



charactersImpl
abstract public void charactersImpl(char ch, int start, int length) throws SAXException(Code)
Receive character notifications
Parameters:
  ch -
Parameters:
  start -
Parameters:
  length -
throws:
  SAXException -



configure
public void configure(Configuration conf) throws ConfigurationException(Code)
Set the configurations for this serializer.



encode
protected void encode(String data) throws SAXException(Code)
Encode and write a String



encode
protected void encode(char data) throws SAXException(Code)
Encode and write an array of characters.



encode
protected void encode(char data, int start, int length) throws SAXException(Code)
Encode and write a specific part of an array of characters.



endDocument
public void endDocument() throws SAXException(Code)
Receive notification of the end of a document.



endElement
public void endElement(String nsuri, String local, String qual) throws SAXException(Code)
Receive notification of the end of an element.



endElementImpl
abstract public void endElementImpl(String uri, String local, String qual) throws SAXException(Code)
Receive notification of the end of an element.
Parameters:
  uri - The namespace URI of the root element.
Parameters:
  local - The local name of the root element.
Parameters:
  qual - The fully-qualified name of the root element.



endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException(Code)
End the scope of a prefix-URI mapping.



flush
protected void flush() throws SAXException(Code)
Flush the stream.



getColumnNumber
public int getColumnNumber()(Code)
Return the column number where the current document event ends. The column number, or -1 if none is available.



getLineNumber
public int getLineNumber()(Code)
Return the line number where the current document event ends. The line number, or -1 if none is available.



getLocation
protected String getLocation()(Code)
Return a String describing the current location.



getPublicId
public String getPublicId()(Code)
Return the public identifier for the current document event. A String containing the public identifier,or null if none is available.



getSystemId
public String getSystemId()(Code)
Return the system identifier for the current document event. A String containing the system identifier,or null if none is available.



recycle
public void recycle()(Code)
Reset this EncodingSerializer.



setDocumentLocator
final public void setDocumentLocator(Locator locator)(Code)
Receive an object for locating the origin of SAX document events.



setOutputStream
public void setOutputStream(OutputStream out) throws IOException(Code)
Set the OutputStream where this serializer will write data to.
Parameters:
  out - The OutputStream used for output.



shouldSetContentLength
public boolean shouldSetContentLength()(Code)
Test if the component wants to set the content length.



startDocument
public void startDocument() throws SAXException(Code)
Receive notification of the beginning of a document.



startElement
public void startElement(String nsuri, String local, String qual, Attributes attributes) throws SAXException(Code)
Receive notification of the beginning of an element.



startElementImpl
abstract public void startElementImpl(String uri, String local, String qual, String namespaces, String attributes) throws SAXException(Code)
Receive notification of the beginning of an element.
Parameters:
  uri - The namespace URI of the root element.
Parameters:
  local - The local name of the root element.
Parameters:
  qual - The fully-qualified name of the root element.
Parameters:
  namespaces - An array of String objects containingthe namespaces to be declared by this element.
Parameters:
  attributes - An array of String objects containingall attributes of this element.



startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)
Begin the scope of a prefix-URI Namespace mapping.



write
protected void write(char data) throws SAXException(Code)
Write an array of characters.



write
protected void write(char data, int start, int length) throws SAXException(Code)
Write a portion of an array of characters.



write
protected void write(int c) throws SAXException(Code)
Write a single character.



write
protected void write(String data) throws SAXException(Code)
Write a string.



write
protected void write(String data, int start, int length) throws SAXException(Code)
Write a portion of a string.



writeIndent
protected void writeIndent(int indent) throws SAXException(Code)
Write out character to indent the output according to the level of nesting
Parameters:
  indent -
throws:
  SAXException -



writeln
protected void writeln() throws SAXException(Code)
Write a end-of-line character.



writeln
protected void writeln(String data) throws SAXException(Code)
Write a string and a end-of-line character.



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.