org.apache.cocoon.components.sax
Class XMLByteStreamCompiler

java.lang.Object
  extended by org.apache.cocoon.components.sax.AbstractXMLByteStreamCompiler
      extended by org.apache.cocoon.components.sax.XMLByteStreamCompiler
All Implemented Interfaces:
Poolable, Recyclable, Component, XMLByteStreamConstants, XMLSerializer, XMLConsumer, ContentHandler, LexicalHandler

public final class XMLByteStreamCompiler
extends AbstractXMLByteStreamCompiler
implements XMLSerializer, Recyclable

This a simple xml compiler which outputs a byte array. If you want to reuse this instance, make sure to call recycle() inbetween two compilation tasks.

Version:
$Id: XMLByteStreamCompiler.html 1304258 2012-03-23 10:09:27Z ilgrosso $

Field Summary
 
Fields inherited from interface org.apache.cocoon.components.sax.XMLSerializer
ROLE
 
Fields inherited from interface org.apache.cocoon.components.sax.XMLByteStreamConstants
CHARACTERS, COMMENT, END_CDATA, END_DOCUMENT, END_DTD, END_ELEMENT, END_ENTITY, END_PREFIX_MAPPING, IGNORABLE_WHITESPACE, LOCATOR, PROCESSING_INSTRUCTION, SKIPPED_ENTITY, START_CDATA, START_DOCUMENT, START_DTD, START_ELEMENT, START_ENTITY, START_PREFIX_MAPPING
 
Constructor Summary
XMLByteStreamCompiler()
           
 
Method Summary
 Object getSAXFragment()
          Get the serialized xml data
 void recycle()
           
protected  void write(int b)
           
 
Methods inherited from class org.apache.cocoon.components.sax.AbstractXMLByteStreamCompiler
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping, writeAttributes, writeChars, writeEvent, writeString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 

Constructor Detail

XMLByteStreamCompiler

public XMLByteStreamCompiler()
Method Detail

recycle

public void recycle()
Specified by:
recycle in interface Recyclable
Overrides:
recycle in class AbstractXMLByteStreamCompiler

getSAXFragment

public Object getSAXFragment()
Description copied from interface: XMLSerializer
Get the serialized xml data

Specified by:
getSAXFragment in interface XMLSerializer
Returns:
The serialized xml data.

write

protected void write(int b)
Specified by:
write in class AbstractXMLByteStreamCompiler


Copyright © 1999-2010 The Apache Software Foundation. All Rights Reserved.