Java Doc for Writer.java in  » HTML-Parser » nekohtml » org » cyberneko » html » filters » 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 » HTML Parser » nekohtml » org.cyberneko.html.filters 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   org.cyberneko.html.filters.DefaultFilter
      org.cyberneko.html.filters.Writer

Writer
public class Writer extends DefaultFilter (Code)
An HTML writer written as a filter. Besides serializing the HTML event stream, the writer also passes the document events to the next stage in the pipeline. This allows applications to insert writer filters between other custom filters for debugging purposes.

Since an HTML document may have specified its encoding using the <META> tag and http-equiv/content attributes, the writer will automatically change any character set specified in this tag to match the encoding of the output stream. Therefore, the character encoding name used to construct the writer should be an official IANA encoding name and not a Java encoding name.

Note: The modified character set in the <META> tag is not propagated to the next stage in the pipeline. The changed value is only output to the stream; the original value is sent to the next stage in the pipeline.
author:
   Andy Clark
version:
   $Id: Writer.java,v 1.7 2005/02/14 04:01:33 andyc Exp $



Field Summary
final protected static  StringAUGMENTATIONS
     Augmentations feature identifier.
final protected static  StringFILTERS
     Filters property identifier.
final public static  StringNOTIFY_CHAR_REFS
     Notify character entity references.
final public static  StringNOTIFY_HTML_BUILTIN_REFS
     Notify built-in entity references.
protected  intfElementDepth
     Element depth.
protected  StringfEncoding
     The encoding.
protected  booleanfNormalize
     Normalize character content.
protected  booleanfPrintChars
     Print characters.
protected  PrintWriterfPrinter
     The print writer used for serializing the document with the appropriate character encoding.
protected  booleanfSeenHttpEquiv
     Seen http-equiv directive.
protected  booleanfSeenRootElement
     Seen root element.

Constructor Summary
public  Writer()
     Constructs a writer filter that prints to standard out.
public  Writer(OutputStream outputStream, String encoding)
     Constructs a writer filter using the specified output stream and encoding.
Parameters:
  outputStream - The output stream to write to.
Parameters:
  encoding - The encoding to be used for the output.
public  Writer(java.io.Writer writer, String encoding)
     Constructs a writer filter using the specified Java writer and encoding.
Parameters:
  writer - The Java writer to write to.
Parameters:
  encoding - The encoding to be used for the output.

Method Summary
public  voidcharacters(XMLString text, Augmentations augs)
     Characters.
public  voidcomment(XMLString text, Augmentations augs)
     Comment.
public  voidemptyElement(QName element, XMLAttributes attributes, Augmentations augs)
     Empty element.
public  voidendElement(QName element, Augmentations augs)
     End element.
public  voidendGeneralEntity(String name, Augmentations augs)
     End general entity.
public static  voidmain(String[] argv)
     Main.
protected  voidprintAttributeValue(String text)
     Print attribute value.
protected  voidprintCharacters(XMLString text, boolean normalize)
     Print characters.
protected  voidprintEndElement(QName element)
     Print end element.
protected  voidprintEntity(String name)
     Print entity.
protected  voidprintStartElement(QName element, XMLAttributes attributes)
     Print start element.
public  voidstartDocument(XMLLocator locator, String encoding, NamespaceContext nscontext, Augmentations augs)
     Start document.
public  voidstartDocument(XMLLocator locator, String encoding, Augmentations augs)
     Start document.
public  voidstartElement(QName element, XMLAttributes attributes, Augmentations augs)
     Start element.
public  voidstartGeneralEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs)
     Start general entity.

Field Detail
AUGMENTATIONS
final protected static String AUGMENTATIONS(Code)
Augmentations feature identifier.



FILTERS
final protected static String FILTERS(Code)
Filters property identifier.



NOTIFY_CHAR_REFS
final public static String NOTIFY_CHAR_REFS(Code)
Notify character entity references.



NOTIFY_HTML_BUILTIN_REFS
final public static String NOTIFY_HTML_BUILTIN_REFS(Code)
Notify built-in entity references.



fElementDepth
protected int fElementDepth(Code)
Element depth.



fEncoding
protected String fEncoding(Code)
The encoding.



fNormalize
protected boolean fNormalize(Code)
Normalize character content.



fPrintChars
protected boolean fPrintChars(Code)
Print characters.



fPrinter
protected PrintWriter fPrinter(Code)
The print writer used for serializing the document with the appropriate character encoding.



fSeenHttpEquiv
protected boolean fSeenHttpEquiv(Code)
Seen http-equiv directive.



fSeenRootElement
protected boolean fSeenRootElement(Code)
Seen root element.




Constructor Detail
Writer
public Writer()(Code)
Constructs a writer filter that prints to standard out.



Writer
public Writer(OutputStream outputStream, String encoding) throws UnsupportedEncodingException(Code)
Constructs a writer filter using the specified output stream and encoding.
Parameters:
  outputStream - The output stream to write to.
Parameters:
  encoding - The encoding to be used for the output. The encoding nameshould be an official IANA encoding name.



Writer
public Writer(java.io.Writer writer, String encoding)(Code)
Constructs a writer filter using the specified Java writer and encoding.
Parameters:
  writer - The Java writer to write to.
Parameters:
  encoding - The encoding to be used for the output. The encoding nameshould be an official IANA encoding name.




Method Detail
characters
public void characters(XMLString text, Augmentations augs) throws XNIException(Code)
Characters.



comment
public void comment(XMLString text, Augmentations augs) throws XNIException(Code)
Comment.



emptyElement
public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException(Code)
Empty element.



endElement
public void endElement(QName element, Augmentations augs) throws XNIException(Code)
End element.



endGeneralEntity
public void endGeneralEntity(String name, Augmentations augs) throws XNIException(Code)
End general entity.



main
public static void main(String[] argv) throws Exception(Code)
Main.



printAttributeValue
protected void printAttributeValue(String text)(Code)
Print attribute value.



printCharacters
protected void printCharacters(XMLString text, boolean normalize)(Code)
Print characters.



printEndElement
protected void printEndElement(QName element)(Code)
Print end element.



printEntity
protected void printEntity(String name)(Code)
Print entity.



printStartElement
protected void printStartElement(QName element, XMLAttributes attributes)(Code)
Print start element.



startDocument
public void startDocument(XMLLocator locator, String encoding, NamespaceContext nscontext, Augmentations augs) throws XNIException(Code)
Start document.



startDocument
public void startDocument(XMLLocator locator, String encoding, Augmentations augs) throws XNIException(Code)
Start document.



startElement
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException(Code)
Start element.



startGeneralEntity
public void startGeneralEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs) throws XNIException(Code)
Start general entity.



Fields inherited from org.cyberneko.html.filters.DefaultFilter
protected XMLDocumentHandler fDocumentHandler(Code)(Java Doc)
protected XMLDocumentSource fDocumentSource(Code)(Java Doc)

Methods inherited from org.cyberneko.html.filters.DefaultFilter
public void characters(XMLString text, Augmentations augs) throws XNIException(Code)(Java Doc)
public void comment(XMLString text, Augmentations augs) throws XNIException(Code)(Java Doc)
public void doctypeDecl(String root, String publicId, String systemId, Augmentations augs) throws XNIException(Code)(Java Doc)
public void emptyElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException(Code)(Java Doc)
public void endCDATA(Augmentations augs) throws XNIException(Code)(Java Doc)
public void endDocument(Augmentations augs) throws XNIException(Code)(Java Doc)
public void endElement(QName element, Augmentations augs) throws XNIException(Code)(Java Doc)
public void endGeneralEntity(String name, Augmentations augs) throws XNIException(Code)(Java Doc)
public void endPrefixMapping(String prefix, Augmentations augs) throws XNIException(Code)(Java Doc)
public XMLDocumentHandler getDocumentHandler()(Code)(Java Doc)
public XMLDocumentSource getDocumentSource()(Code)(Java Doc)
public Boolean getFeatureDefault(String featureId)(Code)(Java Doc)
public Object getPropertyDefault(String propertyId)(Code)(Java Doc)
public String[] getRecognizedFeatures()(Code)(Java Doc)
public String[] getRecognizedProperties()(Code)(Java Doc)
public void ignorableWhitespace(XMLString text, Augmentations augs) throws XNIException(Code)(Java Doc)
protected static String[] merge(String[] array1, String[] array2)(Code)(Java Doc)
public void processingInstruction(String target, XMLString data, Augmentations augs) throws XNIException(Code)(Java Doc)
public void reset(XMLComponentManager componentManager) throws XMLConfigurationException(Code)(Java Doc)
public void setDocumentHandler(XMLDocumentHandler handler)(Code)(Java Doc)
public void setDocumentSource(XMLDocumentSource source)(Code)(Java Doc)
public void setFeature(String featureId, boolean state) throws XMLConfigurationException(Code)(Java Doc)
public void setProperty(String propertyId, Object value) throws XMLConfigurationException(Code)(Java Doc)
public void startCDATA(Augmentations augs) throws XNIException(Code)(Java Doc)
public void startDocument(XMLLocator locator, String encoding, NamespaceContext nscontext, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startDocument(XMLLocator locator, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startElement(QName element, XMLAttributes attributes, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startGeneralEntity(String name, XMLResourceIdentifier id, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
public void startPrefixMapping(String prefix, String uri, Augmentations augs) throws XNIException(Code)(Java Doc)
public void textDecl(String version, String encoding, Augmentations augs) throws XNIException(Code)(Java Doc)
public void xmlDecl(String version, String encoding, String standalone, Augmentations augs) throws XNIException(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.