cziegeler    01/07/11 23:23:22

  Modified:    src/org/apache/cocoon/caching CachingOutputStream.java
  Log:
  Fixed calculation of byte array length
  
  Revision  Changes    Path
  1.3       +3 -3      
xml-cocoon2/src/org/apache/cocoon/caching/CachingOutputStream.java
  
  Index: CachingOutputStream.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/caching/CachingOutputStream.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- CachingOutputStream.java  2001/05/14 11:43:07     1.2
  +++ CachingOutputStream.java  2001/07/12 06:23:19     1.3
  @@ -16,7 +16,7 @@
    * TeeOutputStream.
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Carsten Ziegeler</a>
  - * @version CVS $Revision: 1.2 $ $Date: 2001/05/14 11:43:07 $
  + * @version CVS $Revision: 1.3 $ $Date: 2001/07/12 06:23:19 $
    */
   
   public final class CachingOutputStream
  @@ -61,7 +61,7 @@
       public void write(byte b[], int off, int len) throws IOException {
           this.receiver.write(b, off, len);
           if (len == 0) return;
  -        int newcount = this.bufCount + len;
  +        int newcount = this.bufCount + (len-off);
           if (newcount > this.buf.length) {
               byte newbuf[] = new byte[Math.max(this.buf.length << 1, newcount)];
               System.arraycopy(this.buf, 0, newbuf, 0, this.bufCount);
  @@ -80,4 +80,4 @@
       }
   
   
  -}
  \ No newline at end of file
  +}
  
  
  

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