cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cziege...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/reading ResourceReader.java
Date Tue, 22 Jan 2002 09:01:13 GMT
cziegeler    02/01/22 01:01:12

  Modified:    src/java/org/apache/cocoon/reading ResourceReader.java
  Log:
  Improve performance of resource reader
  
  Revision  Changes    Path
  1.2       +6 -19     xml-cocoon2/src/java/org/apache/cocoon/reading/ResourceReader.java
  
  Index: ResourceReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/reading/ResourceReader.java,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- ResourceReader.java	3 Jan 2002 12:31:18 -0000	1.1
  +++ ResourceReader.java	22 Jan 2002 09:01:12 -0000	1.2
  @@ -8,8 +8,6 @@
   package org.apache.cocoon.reading;
   
   import org.apache.avalon.excalibur.pool.Poolable;
  -import org.apache.avalon.framework.component.ComponentManager;
  -import org.apache.avalon.framework.component.Composable;
   import org.apache.avalon.framework.parameters.Parameters;
   import org.apache.cocoon.Constants;
   import org.apache.cocoon.ProcessingException;
  @@ -31,7 +29,7 @@
   /**
    *
    * @author <a href="mailto:Giacomo.Pati@pwr.ch">Giacomo Pati</a>
  - * @version CVS $Revision: 1.1 $ $Date: 2002/01/03 12:31:18 $
  + * @version CVS $Revision: 1.2 $ $Date: 2002/01/22 09:01:12 $
    *
    * The <code>ResourceReader</code> component is used to serve binary data
    * in a sitemap pipeline. It makes use of HTTP Headers to determine if
  @@ -47,10 +45,9 @@
    *       </dd>
    *   </dl>
    */
  -public class ResourceReader extends AbstractReader
  -            implements Composable, Cacheable, Poolable {
  -
  -    private ComponentManager manager;
  +public class ResourceReader
  +  extends AbstractReader
  +  implements Cacheable {
   
       /** The  source */
       private Source      inputSource;
  @@ -67,10 +64,6 @@
           this.inputSource = this.resolver.resolve(super.source);
       }
   
  -    public void compose (ComponentManager manager) {
  -        this.manager = manager;
  -    }
  -
       public void recycle() {
           super.recycle();
           if (this.inputSource != null) {
  @@ -116,7 +109,8 @@
       /**
        * Generates the requested resource.
        */
  -    public void generate() throws IOException, ProcessingException {
  +    public void generate()
  +    throws IOException, ProcessingException {
           Response response = (Response) objectModel.get(Constants.RESPONSE_OBJECT);
   
           try {
  @@ -154,13 +148,6 @@
           } else {
              return null;
           }
  -    }
  -
  -    /**
  -     * Test if the component wants to set the content length
  -     */
  -    public boolean shouldSetContentLength() {
  -        return (this.inputSource.getContentLength() != -1);
       }
   
   }
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org


Mime
View raw message