Can't recevie attachment part correctly
---------------------------------------
Key: WSCOMMONS-100
URL: http://issues.apache.org/jira/browse/WSCOMMONS-100
Project: WS-Commons
Issue Type: Bug
Components: AXIOM
Environment: All
Reporter: kazushi KANESHIRO
Priority: Critical
My testprogram is failed to receive attachment part through
BoundaryDelimitedStream.
I look the source code of Class BoundaryDelimitedStream, I find doubtful part
in the BoundaryDelimitedStream.java.
This doubtful part is following.(BoundaryDelimitedStream.java : line 265-282)
///////////////////////////////////////////////////////////////////////////////////////////////////
int bwritten = -1; // Number of bytes written.
// 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);
// never go past the boundary.
bcopy = Math.min(bcopy, boundaryPos - readBufPos);
if (bcopy > 0) {
System.arraycopy(readbuf, readBufPos, b, off + bwritten, bcopy);
bwritten += bcopy;
readBufPos += bcopy;
}
///////////////////////////////////////////////////////////////////////////////////////////////////
I understand that variable bwritten is used for new writing position of buffer.
(BoundaryDelimitedStream.java : line278-282)
If my understanding is correct, I think variable bwritten must be keeping while
do-while sentece is active.
But, variable bwritten is substituted 0 each loop in the above code.
(BoundaryDelimitedStream.java : line 270)
Would you check this part in the source code?
thanks.
--
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]