org.apache.cocoon.reading
Class RequestReader

java.lang.Object
  extended by org.apache.avalon.framework.logger.AbstractLogEnabled
      extended by org.apache.cocoon.reading.AbstractReader
          extended by org.apache.cocoon.reading.RequestReader
All Implemented Interfaces:
org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, org.apache.avalon.framework.component.Component, org.apache.avalon.framework.logger.LogEnabled, org.apache.cocoon.reading.Reader, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.sitemap.SitemapOutputComponent

public class RequestReader
extends org.apache.cocoon.reading.AbstractReader

The RequestReader component is used to serve binary data from the Http request


Field Summary
protected  int bufferSize
           
protected  javax.servlet.http.HttpServletRequest httpRequest
           
protected  org.apache.cocoon.environment.Response response
           
 
Fields inherited from class org.apache.cocoon.reading.AbstractReader
objectModel, out, parameters, resolver, source
 
Fields inherited from interface org.apache.cocoon.reading.Reader
ROLE
 
Constructor Summary
RequestReader()
           
 
Method Summary
 void generate()
          Generates the requested resource.
 java.lang.String getMimeType()
          Returns the mime-type of the resource in process.
protected  void processStream(java.io.InputStream inputStream)
           
 void recycle()
          Recyclable
 void setup(org.apache.cocoon.environment.SourceResolver resolver, java.util.Map objectModel, java.lang.String src, org.apache.avalon.framework.parameters.Parameters par)
          Setup the reader The resource is opened to get an HttpServletRequest
 
Methods inherited from class org.apache.cocoon.reading.AbstractReader
getLastModified, setOutputStream, shouldSetContentLength
 
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled
enableLogging, getLogger, setupLogger, setupLogger, setupLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

bufferSize

protected int bufferSize

response

protected org.apache.cocoon.environment.Response response

httpRequest

protected javax.servlet.http.HttpServletRequest httpRequest
Constructor Detail

RequestReader

public RequestReader()
Method Detail

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  java.util.Map objectModel,
                  java.lang.String src,
                  org.apache.avalon.framework.parameters.Parameters par)
           throws org.apache.cocoon.ProcessingException,
                  org.xml.sax.SAXException,
                  java.io.IOException
Setup the reader The resource is opened to get an HttpServletRequest

Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Overrides:
setup in class org.apache.cocoon.reading.AbstractReader
Throws:
org.apache.cocoon.ProcessingException
org.xml.sax.SAXException
java.io.IOException

recycle

public void recycle()
Recyclable

Specified by:
recycle in interface org.apache.avalon.excalibur.pool.Recyclable
Overrides:
recycle in class org.apache.cocoon.reading.AbstractReader

processStream

protected void processStream(java.io.InputStream inputStream)
                      throws java.io.IOException,
                             org.apache.cocoon.ProcessingException
Throws:
java.io.IOException
org.apache.cocoon.ProcessingException

generate

public void generate()
              throws java.io.IOException,
                     org.apache.cocoon.ProcessingException
Generates the requested resource.

Throws:
java.io.IOException
org.apache.cocoon.ProcessingException

getMimeType

public java.lang.String getMimeType()
Returns the mime-type of the resource in process.

Specified by:
getMimeType in interface org.apache.cocoon.sitemap.SitemapOutputComponent
Overrides:
getMimeType in class org.apache.cocoon.reading.AbstractReader


Copyright $ Apache Software Foundation. All Rights Reserved.