cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From blorit...@apache.org
Subject cvs commit: xml-cocoon/src/org/apache/cocoon/reading DatabaseReader.java
Date Fri, 09 Mar 2001 15:29:56 GMT
bloritsch    01/03/09 07:29:56

  Modified:    src/org/apache/cocoon/reading Tag: xml-cocoon2
                        DatabaseReader.java
  Log:
  Fixed DatabaseReader so that it can use the proper outputstream.
  It WORKS!!!!!
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.3   +4 -5      xml-cocoon/src/org/apache/cocoon/reading/Attic/DatabaseReader.java
  
  Index: DatabaseReader.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/reading/Attic/DatabaseReader.java,v
  retrieving revision 1.1.2.2
  retrieving revision 1.1.2.3
  diff -u -r1.1.2.2 -r1.1.2.3
  --- DatabaseReader.java	2001/03/09 15:07:29	1.1.2.2
  +++ DatabaseReader.java	2001/03/09 15:29:55	1.1.2.3
  @@ -33,6 +33,8 @@
   import java.io.IOException;
   import java.util.Date;
   
  +import org.xml.sax.SAXException;
  +
   import javax.servlet.http.HttpServletResponse;
   import javax.servlet.http.HttpServletRequest;
   
  @@ -89,7 +91,7 @@
        * Lastly, the <code>key</code> value is derived from the value of
        * the <code>source</code> string.
        */
  -    public void generate() throws org.apache.cocoon.ProcessingException, org.xml.sax.SAXException,
java.io.IOException {
  +    public void generate() throws ProcessingException, SAXException, IOException {
           DataSourceComponent datasource = null;
           Connection con = null;
   
  @@ -208,7 +210,6 @@
           }
   
           InputStream is = object.getBinaryStream();
  -        OutputStream os = response.getOutputStream();
   
           byte[] bytes = new byte[(int) object.length()];
           is.read(bytes);
  @@ -222,8 +223,6 @@
           }
   
           response.setHeader("Accept-Ranges", "bytes");
  -        os.write(bytes);
  -        os.flush();
  -        os.close();
  +        out.write(bytes);
       }
   }
  
  
  

----------------------------------------------------------------------
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