vgritsenko    2003/02/11 20:07:23

  Modified:    src/java/org/apache/cocoon/util BufferedOutputStream.java
  Log:
  Override close method and flush on close. Fixes bug #15350.
  Thanks to [EMAIL PROTECTED] (Christoph Trompler)
  
  Revision  Changes    Path
  1.4       +13 -2     
xml-cocoon2/src/java/org/apache/cocoon/util/BufferedOutputStream.java
  
  Index: BufferedOutputStream.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/java/org/apache/cocoon/util/BufferedOutputStream.java,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- BufferedOutputStream.java 31 Jan 2003 22:51:58 -0000      1.3
  +++ BufferedOutputStream.java 12 Feb 2003 04:07:23 -0000      1.4
  @@ -90,7 +90,7 @@
        * @exception IllegalArgumentException if size <= 0.
        */
       public BufferedOutputStream(OutputStream out, int size) {
  -    super(out);
  +        super(out);
           if (size <= 0) {
               throw new IllegalArgumentException("Buffer size <= 0");
           }
  @@ -144,7 +144,18 @@
       public void flush() throws IOException {
       }
   
  -    /** 
  +    /**
  +     * Closes this buffered output stream.
  +     * Flush before closing.
  +     *
  +     * @exception  IOException  if an I/O error occurs.
  +     */
  +    public void close() throws IOException {
  +        realFlush();
  +        super.close ();
  +    }
  +
  +    /**
        * Flushes this buffered output stream. 
        * We don't flush here. 
        */
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to