ws-commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rich Scheuerle (JIRA)" <j...@apache.org>
Subject [jira] Updated: (WSCOMMONS-275) The read methods of org.apache.axiom.attachments.MIMEBodyPartInputStream return "0" in no more data.
Date Wed, 05 Mar 2008 15:53:40 GMT

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

Rich Scheuerle updated WSCOMMONS-275:
-------------------------------------

    Assignee: Rich Scheuerle

I am familiar with this code and will consider it for the 1.2.6 release.

> The read methods of org.apache.axiom.attachments.MIMEBodyPartInputStream return "0" in
no more data.
> ----------------------------------------------------------------------------------------------------
>
>                 Key: WSCOMMONS-275
>                 URL: https://issues.apache.org/jira/browse/WSCOMMONS-275
>             Project: WS-Commons
>          Issue Type: Bug
>          Components: AXIOM
>            Reporter: Kazushi KANESHIRO
>            Assignee: Rich Scheuerle
>
> axiom-1.2.5-src\modules\axiom-api\src\main\java\org\apache\axiom\attachments\
> MIMEBodyPartInputStream.java
> has bugs.
> line 85
> Please replace
>             return 0;
> by
>             return -1;
> line 99
> Please replace
>             return 0;
> by
>             return -1;
> Because
> read(byte[] b, int off, int len)
> and
> read(byte[] b)
> must return -1 according to the specification of java.io.InputStream.
> See
> http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[], int, int)
> http://java.sun.com/javase/6/docs/api/java/io/InputStream.html#read(byte[])
> public int read(byte[] b,
>                 int off,
>                 int len)
>          throws IOException
> Returns:
> the total number of bytes read into the buffer, or -1 if there is no more data because
the end of the stream has been reached.
> public int read(byte[] b)
>          throws IOException
> Returns:
> the total number of bytes read into the buffer, or -1 is there is no more data because
the end of the stream has been reached. 

-- 
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


Mime
View raw message