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 <[EMAIL PROTECTED]>
  
  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:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to