cziegeler 01/07/11 23:24:01
Modified: src/org/apache/cocoon/caching Tag: cocoon_20_branch
CachingOutputStream.java
Log:
Fixed calculation of byte array length
Revision Changes Path
No revision
No revision
1.2.2.1 +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.2.2.1
diff -u -r1.2 -r1.2.2.1
--- CachingOutputStream.java 2001/05/14 11:43:07 1.2
+++ CachingOutputStream.java 2001/07/12 06:23:58 1.2.2.1
@@ -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.2.2.1 $ $Date: 2001/07/12 06:23:58 $
*/
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]