You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commons-dev@ws.apache.org by "Rich Scheuerle (JIRA)" <ji...@apache.org> on 2007/09/13 22:25:33 UTC

[jira] Resolved: (WSCOMMONS-118) BoundaryDelimitedStream read(byte[] b) only works with b.length == 1

     [ https://issues.apache.org/jira/browse/WSCOMMONS-118?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rich Scheuerle resolved WSCOMMONS-118.
--------------------------------------

    Resolution: Fixed

Fixed by WSCOMMONS-245
Revision 575436

> BoundaryDelimitedStream read(byte[] b) only works with b.length == 1
> --------------------------------------------------------------------
>
>                 Key: WSCOMMONS-118
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-118
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Holger Lange
>            Assignee: Rich Scheuerle
>         Attachments: BoundaryDelimitedStreamTestCase.zip
>
>
> 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.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@ws.apache.org
For additional commands, e-mail: commons-dev-help@ws.apache.org