[flaptor-util commit] r197 - Fixed a horrible bug that would cause erratic data corruption when using IOUtil.readAllBin...

0 views
Skip to first unread message

codesite...@google.com

unread,
Jun 25, 2009, 4:44:32 PM6/25/09
to flaptor-o...@googlegroups.com
Author: san...@santip.com.ar
Date: Thu Jun 25 13:43:50 2009
New Revision: 197

Modified:
trunk/src/com/flaptor/util/IOUtil.java

Log:
Fixed a horrible bug that would cause erratic data corruption when using
IOUtil.readAllBinary()

Modified: trunk/src/com/flaptor/util/IOUtil.java
==============================================================================
--- trunk/src/com/flaptor/util/IOUtil.java (original)
+++ trunk/src/com/flaptor/util/IOUtil.java Thu Jun 25 13:43:50 2009
@@ -96,7 +96,7 @@
while(true) {
int bytesRead = stream.read(buffer);
if (bytesRead == -1) break;
- o.write(buffer);
+ o.write(buffer, 0, bytesRead);
}
return o.toByteArray();
}

Reply all
Reply to author
Forward
0 new messages