cocoon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From craft...@apache.org
Subject cvs commit: xml-cocoon2/src/java/org/apache/cocoon/util BufferedOutputStream.java
Date Fri, 08 Nov 2002 11:09:39 GMT
crafterm    2002/11/08 03:09:39

  Modified:    src/java/org/apache/cocoon/util BufferedOutputStream.java
  Log:
  Applied buffer resize fix. Internal buffer is now doubled in size
  continuously until there is enough space to hold the new contents.
  
  PR: #14379
  Submitted by: Keiron Liddle <keiron@aftexsw.com>
  
  Revision  Changes    Path
  1.2       +1 -4      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.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- BufferedOutputStream.java	12 Sep 2002 14:14:36 -0000	1.1
  +++ BufferedOutputStream.java	8 Nov 2002 11:09:39 -0000	1.2
  @@ -127,10 +127,7 @@
        * @exception  IOException  if an I/O error occurs.
        */
       public void write(byte b[], int off, int len) throws IOException {
  -        if (len >= buf.length) {
  -            this.incBuffer();
  -        }
  -        if (len > buf.length - count) {
  +        while (len > buf.length - count) {
               this.incBuffer();
           }
           System.arraycopy(b, off, buf, count, len);
  
  
  

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