Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » generation » [javadoc | source]
org.apache.cocoon.generation
public class: StreamGenerator [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.generation.AbstractGenerator
            org.apache.cocoon.generation.ServiceableGenerator
               org.apache.cocoon.generation.StreamGenerator

All Implemented Interfaces:
    org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.service.Serviceable, Generator, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

Field Summary
public static final  String FORM_NAME    The parameter holding the name associated with the xml data 
Fields inherited from org.apache.cocoon.generation.ServiceableGenerator:
manager
Fields inherited from org.apache.cocoon.generation.AbstractGenerator:
resolver,  objectModel,  parameters,  source
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Method from org.apache.cocoon.generation.StreamGenerator Summary:
extractCharset,   generate,   getCharacterEncoding,   recycle
Methods from org.apache.cocoon.generation.ServiceableGenerator:
dispose,   service
Methods from org.apache.cocoon.generation.AbstractGenerator:
recycle,   setup
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.generation.StreamGenerator Detail:
 protected String extractCharset(String contentType,
    int idx) 
 public  void generate() throws IOException, SAXException, ProcessingException 
    Generate XML data out of request InputStream.
 public String getCharacterEncoding(Request req,
    String contentType) 
    Content type HTTP header can contains character encodinf info for ex. Content-Type: text/xml; charset=UTF-8 If the servlet is following spec 2.3 and higher the servlet API can be used to retrieve character encoding part of Content-Type header. Some containers can choose to not unpack charset info - the spec is not strong about it. in any case this method can be used as a latest resource to retrieve the passed charset value. null is returned. It is very common mistake to send : Content-Type: text/xml; charset="UTF-8". Some containers are not filtering this mistake and the processing results in exception.. The getCharacterEncoding() compensates for above mistake.
 public  void recycle() 
    Recycle this component. All instance variables are set to null.