svn commit: r585557 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r585557 - /ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java

doogie-3
Author: doogie
Date: Wed Oct 17 09:26:45 2007
New Revision: 585557

URL: http://svn.apache.org/viewvc?rev=585557&view=rev
Log:
Implement the 2 other write variants, so that block-writing is
more efficient.  Closes https://issues.apache.org/jira/browse/OFBIZ-1323

Modified:
    ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java

Modified: ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java
URL: http://svn.apache.org/viewvc/ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java?rev=585557&r1=585556&r2=585557&view=diff
==============================================================================
--- ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java (original)
+++ ofbiz/trunk/framework/base/src/base/org/ofbiz/base/util/OutputStreamByteCount.java Wed Oct 17 09:26:45 2007
@@ -36,6 +36,14 @@
     public void write(int arg0) throws IOException {
         byteCount++;
     }
+
+    public void write(byte[] b) throws IOException {
+        byteCount += b.length;
+    }
+
+    public void write(byte[] b, int off, int len) throws IOException {
+        byteCount += len;
+    }
     
     public long getByteCount() {
         return this.byteCount;