org.apache.cocoon.components.sax
Class XMLByteStreamInterpreter

java.lang.Object
  extended by org.apache.cocoon.components.sax.AbstractXMLByteStreamInterpreter
      extended by org.apache.cocoon.components.sax.XMLByteStreamInterpreter
All Implemented Interfaces:
Component, XMLByteStreamConstants, XMLDeserializer, XMLProducer

public final class XMLByteStreamInterpreter
extends AbstractXMLByteStreamInterpreter
implements XMLDeserializer

This a simple xml compiler which takes a byte array as input. If you want to reuse this interpreter make sure to call first recycle() and then set the new consumer for the sax events.

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

Field Summary
 
Fields inherited from class org.apache.cocoon.components.sax.AbstractXMLByteStreamInterpreter
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler
 
Fields inherited from interface org.apache.cocoon.components.sax.XMLDeserializer
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
XMLByteStreamInterpreter()
           
 
Method Summary
 void deserialize(Object saxFragment)
          Deserialize the xml data and stream it.
protected  int read()
           
protected  int read(byte[] b)
           
 void recycle()
           
 
Methods inherited from class org.apache.cocoon.components.sax.AbstractXMLByteStreamInterpreter
parse, readEvent, setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Constructor Detail

XMLByteStreamInterpreter

public XMLByteStreamInterpreter()
Method Detail

recycle

public void recycle()
Overrides:
recycle in class AbstractXMLByteStreamInterpreter

deserialize

public void deserialize(Object saxFragment)
                 throws SAXException
Description copied from interface: XMLDeserializer
Deserialize the xml data and stream it.

Specified by:
deserialize in interface XMLDeserializer
Parameters:
saxFragment - The xml data.
Throws:
SAXException

read

protected int read()
            throws SAXException
Specified by:
read in class AbstractXMLByteStreamInterpreter
Throws:
SAXException

read

protected int read(byte[] b)
            throws SAXException
Specified by:
read in class AbstractXMLByteStreamInterpreter
Throws:
SAXException


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