Java Doc for SAXContentBuffer.java in  » Workflow-Engines » wfmopen-2.1.1 » de » danet » an » util » sax » 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 » Workflow Engines » wfmopen 2.1.1 » de.danet.an.util.sax 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


java.lang.Object
   de.danet.an.util.sax.SAXContentBuffer

All known Subclasses:   de.danet.an.workflow.util.SAXEventBufferImpl,
SAXContentBuffer
public class SAXContentBuffer implements ContentHandler,LexicalHandler,Serializable(Code)
This class provides a buffer for SAX content events. The events reported to an instance of this class are internally recorded. After recording, the events may be played back an arbitrary number of times.

The class implements SerializableSerializable . An instance of this class may thus be transferred to another process and the SAX events may be replayed there.

This implementation uses code from Apache's XMLByteStreamCompiler and associated interpreter.
author:
  
version:
   $Revision: 1.4 $


Inner Class :public class SAXBufferStreamReader implements Serializable,XMLStreamReader

Field Summary
final static  longserialVersionUID
     Version id for serialization.

Constructor Summary
public  SAXContentBuffer()
     Creates an instance of SAXContentBuffer with all attributes initialized to default values.

Method Summary
public  voidcharacters(char[] ch, int start, int length)
     Receive notification of character data.
public  voidcomment(char[] ary, int start, int length)
     Report an XML comment anywhere in the document.
public  XMLStreamReadercreateXMLStreamReader()
     Create a new XMLEventReader for this SAX content.
public  voidemit(ContentHandler contentHandler, LexicalHandler lexicalHandler)
     Emits the events to the given ContentHandler and LexicalHandler.
public  voidemit(ContentHandler contentHandler)
     Emits the events to the given ContentHandler.
public  voidendCDATA()
     Report the end of a CDATA section.
public  voidendDTD()
     Report the end of DTD declarations.
public  voidendDocument()
     Receive notification of the end of a document.
public  voidendElement(String namespaceURI, String localName, String qName)
     Receive notification of the end of an element.
public  voidendEntity(String name)
     Report the end of an entity.
public  voidendPrefixMapping(String prefix)
     End the scope of a prefix-URI mapping.
public  voidignorableWhitespace(char[] ch, int start, int length)
     Receive notification of ignorable whitespace in element content.
public  voidpack()
     The internal buffer used to record events is enlarged in chunks.
public  voidprocessingInstruction(String target, String data)
     Receive notification of a processing instruction.
Parameters:
  target - The processing instruction target.
Parameters:
  data - The processing instruction data, or null ifnone was supplied.
public  voidsetDocumentLocator(Locator locator)
     Receive an object for locating the origin of SAX document events.
public  voidskippedEntity(String name)
     Receive notification of a skipped entity.
Parameters:
  name - The name of the skipped entity.
public  voidstartCDATA()
     Report the start of a CDATA section.
public  voidstartDTD(String name, String publicId, String systemId)
     Report the start of DTD declarations, if any.
public  voidstartDocument()
     Receive notification of the beginning of a document.
public  voidstartElement(String namespaceURI, String localName, String qName, Attributes atts)
     Receive notification of the beginning of an element.
Parameters:
  namespaceURI - The Namespace URI, or the empty string if theelement has no Namespace URI or if Namespaceprocessing is not being performed.
Parameters:
  localName - The local name (without prefix), or theempty string if Namespace processing is not beingperformed.
Parameters:
  qName - The qualified name (with prefix), or theempty string if qualified names are not available.
Parameters:
  atts - The attributes attached to the element.
public  voidstartEntity(String name)
     Report the beginning of an entity.
Parameters:
  name - The name of the entity.
public  voidstartPrefixMapping(String prefix, String uri)
     Begin the scope of a prefix-URI Namespace mapping.
public  StringtoString()
     Returns a string representation of the buffer's content.
public  StringtoString(boolean pretty)
     Returns a string representation of the buffer's content.
public  NodetoW3cDom()
     Returns a W3C DOM representation of the buffer's content.

Field Detail
serialVersionUID
final static long serialVersionUID(Code)
Version id for serialization.




Constructor Detail
SAXContentBuffer
public SAXContentBuffer()(Code)
Creates an instance of SAXContentBuffer with all attributes initialized to default values.




Method Detail
characters
public void characters(char[] ch, int start, int length) throws SAXException(Code)
Receive notification of character data.
Parameters:
  ch - The characters from the XML document.
Parameters:
  start - The start position in the array.
Parameters:
  length - The number of characters to read from the array.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.
See Also:   SAXContentBuffer.ignorableWhitespace
See Also:   
See Also:   org.xml.sax.Locator



comment
public void comment(char[] ary, int start, int length) throws SAXException(Code)
Report an XML comment anywhere in the document.
Parameters:
  ary - An array holding the characters in the comment.
Parameters:
  start - The starting position in the array.
Parameters:
  length - The number of characters to use from the array.
throws:
  SAXException - not thrown.



createXMLStreamReader
public XMLStreamReader createXMLStreamReader()(Code)
Create a new XMLEventReader for this SAX content. Note that the implementation of the XMLEventReader is currently incomplete and provides only very basic functions. the event reader



emit
public void emit(ContentHandler contentHandler, LexicalHandler lexicalHandler) throws SAXException(Code)
Emits the events to the given ContentHandler and LexicalHandler.
Parameters:
  contentHandler - the content handler that is to receivethe events.
Parameters:
  lexicalHandler - the lexical handler that is to receivethe events (may be null).
throws:
  SAXException - Any SAX exception, possibly wrappinganother exception.



emit
public void emit(ContentHandler contentHandler) throws SAXException(Code)
Emits the events to the given ContentHandler.
Parameters:
  contentHandler - the content handler that is to receivethe events.
throws:
  SAXException - Any SAX exception, possibly wrappinganother exception.



endCDATA
public void endCDATA() throws SAXException(Code)
Report the end of a CDATA section.
throws:
  SAXException - not thrown.



endDTD
public void endDTD() throws SAXException(Code)
Report the end of DTD declarations.
throws:
  SAXException - not thrown.



endDocument
public void endDocument() throws SAXException(Code)
Receive notification of the end of a document.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.
See Also:   SAXContentBuffer.startDocument



endElement
public void endElement(String namespaceURI, String localName, String qName) throws SAXException(Code)
Receive notification of the end of an element.
Parameters:
  namespaceURI - The Namespace URI, or the empty string if theelement has no Namespace URI or if Namespaceprocessing is not being performed.
Parameters:
  localName - The local name (without prefix), or theempty string if Namespace processing is not beingperformed.
Parameters:
  qName - The qualified XML 1.0 name (with prefix), or theempty string if qualified names are not available.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.



endEntity
public void endEntity(String name) throws SAXException(Code)
Report the end of an entity.
Parameters:
  name - The name of the entity that is ending.
throws:
  SAXException - not thrown.



endPrefixMapping
public void endPrefixMapping(String prefix) throws SAXException(Code)
End the scope of a prefix-URI mapping.
Parameters:
  prefix - The prefix that was being mapping.
throws:
  SAXException - The client may throwan exception during processing.
See Also:   SAXContentBuffer.startPrefixMapping
See Also:   SAXContentBuffer.endElement



ignorableWhitespace
public void ignorableWhitespace(char[] ch, int start, int length) throws SAXException(Code)
Receive notification of ignorable whitespace in element content.
Parameters:
  ch - The characters from the XML document.
Parameters:
  start - The start position in the array.
Parameters:
  length - The number of characters to read from the array.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.
See Also:   SAXContentBuffer.characters



pack
public void pack()(Code)
The internal buffer used to record events is enlarged in chunks. So some space may be left after the last event has been recorded. This method resizes the buffer to the minimum.

This method is called by SAXContentBuffer.endDocumentendDocument automatically. However, if only an XML fragment is recorded, there may never be an endDocument event and the mothod should be called manually.




processingInstruction
public void processingInstruction(String target, String data) throws SAXException(Code)
Receive notification of a processing instruction.
Parameters:
  target - The processing instruction target.
Parameters:
  data - The processing instruction data, or null ifnone was supplied. The data does not include anywhitespace separating it from the target.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.



setDocumentLocator
public void setDocumentLocator(Locator locator)(Code)
Receive an object for locating the origin of SAX document events.
Parameters:
  locator - An object that can return the location of anySAX document event.
See Also:   org.xml.sax.Locator



skippedEntity
public void skippedEntity(String name) throws SAXException(Code)
Receive notification of a skipped entity.
Parameters:
  name - The name of the skipped entity. If it is aparameter entity, the name will begin with '%', and if it isthe external DTD subset, it will be the string "[dtd]".
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.



startCDATA
public void startCDATA() throws SAXException(Code)
Report the start of a CDATA section.
throws:
  SAXException - not thrown.



startDTD
public void startDTD(String name, String publicId, String systemId) throws SAXException(Code)
Report the start of DTD declarations, if any.
Parameters:
  name - The document type name.
Parameters:
  publicId - The declared public identifier for the external DTDsubset, or null if none was declared.
Parameters:
  systemId - The declared system identifier for the external DTDsubset, or null if none was declared.
throws:
  SAXException - not thrown.



startDocument
public void startDocument() throws SAXException(Code)
Receive notification of the beginning of a document.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.
See Also:   SAXContentBuffer.endDocument



startElement
public void startElement(String namespaceURI, String localName, String qName, Attributes atts) throws SAXException(Code)
Receive notification of the beginning of an element.
Parameters:
  namespaceURI - The Namespace URI, or the empty string if theelement has no Namespace URI or if Namespaceprocessing is not being performed.
Parameters:
  localName - The local name (without prefix), or theempty string if Namespace processing is not beingperformed.
Parameters:
  qName - The qualified name (with prefix), or theempty string if qualified names are not available.
Parameters:
  atts - The attributes attached to the element. Ifthere are no attributes, it shall be an emptyAttributes object.
throws:
  SAXException - Any SAX exception, possiblywrapping another exception.
See Also:   SAXContentBuffer.endElement
See Also:   org.xml.sax.Attributes



startEntity
public void startEntity(String name) throws SAXException(Code)
Report the beginning of an entity.
Parameters:
  name - The name of the entity. If it is a parameter entity, thename will begin with '%'.
throws:
  SAXException - not thrown.



startPrefixMapping
public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)
Begin the scope of a prefix-URI Namespace mapping.
Parameters:
  prefix - The Namespace prefix being declared.
Parameters:
  uri - The Namespace URI the prefix is mapped to.
throws:
  SAXException - The client may throw anexception during processing.
See Also:   SAXContentBuffer.endPrefixMapping
See Also:   SAXContentBuffer.startElement



toString
public String toString()(Code)
Returns a string representation of the buffer's content. Note that this method should not be used to generate XML as charcode handling is partially undefined (dependant on the platform configuration). a terse (unindented) XML representation



toString
public String toString(boolean pretty)(Code)
Returns a string representation of the buffer's content. Note that this method should not be used to generate XML as charcode handling is partially undefined (dependant on the platform configuration).
Parameters:
  pretty - if true output will be formatedusing line breaks and indentation, thus improving readability the XML representation



toW3cDom
public Node toW3cDom()(Code)
Returns a W3C DOM representation of the buffer's content. the DOM representation



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.