BoundaryDelimitedStream read(byte[] b) only works with b.length == 1
--------------------------------------------------------------------
Key: WSCOMMONS-118
URL: http://issues.apache.org/jira/browse/WSCOMMONS-118
Project: WS-Commons
Issue Type: Bug
Components: AXIOM
Reporter: Holger Lange
With the current trunk the stream cannot be read correctly if b.length > 1.
This patch seems to fix it:
Index: .
===================================================================
--- . (revision 469843)
+++ . (working copy)
@@ -262,7 +262,7 @@
boundaryPos = boundaryPosition(readbuf, 0, readBufEnd);
}
- int bwritten = -1; // Number of bytes written.
+ int bwritten = 0; // Number of bytes written.
// read and copy bytes in.
do { // Always allow to have a boundary
length left in the buffer.
@@ -267,7 +267,6 @@
// read and copy bytes in.
do { // Always allow to have a boundary
length left in the buffer.
- bwritten = 0;
int bcopy = Math.min(readBufEnd - readBufPos - boundaryBufLen,
len - bwritten);
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]