You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (Created) (JIRA)" <ji...@apache.org> on 2011/10/25 19:14:32 UTC

[jira] [Created] (IO-290) Add read/readFully methods to IOUtils

Add read/readFully methods to IOUtils
-------------------------------------

                 Key: IO-290
                 URL: https://issues.apache.org/jira/browse/IO-290
             Project: Commons IO
          Issue Type: New Feature
            Reporter: Sebb


When reading from network etc, it's possible for a read to return before it has read as many bytes as would fit in the buffer.
Sometimes multiple reads are needed to fulfil the request.

It would be useful to have read() versions of the skip() methods.

{code}
int actual = read(Reader, byte buffer [,offset, length]) // returns normally on EOF
int actual = read(InputStream, char buffer [,offset, length])

int actual = readFully(Reader, byte buffer [,offset, length]) // throws EOFException
int actual = readFully(InputStream, char buffer [,offset, length])
{code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (IO-290) Add read/readFully methods to IOUtils

Posted by "Sebb (Resolved) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sebb resolved IO-290.
---------------------

       Resolution: Fixed
    Fix Version/s: 2.2
    
> Add read/readFully methods to IOUtils
> -------------------------------------
>
>                 Key: IO-290
>                 URL: https://issues.apache.org/jira/browse/IO-290
>             Project: Commons IO
>          Issue Type: New Feature
>            Reporter: Sebb
>             Fix For: 2.2
>
>
> When reading from network etc, it's possible for a read to return before it has read as many bytes as would fit in the buffer.
> Sometimes multiple reads are needed to fulfil the request.
> It would be useful to have read() versions of the skip() methods.
> {code}
> int actual = read(Reader, byte buffer [,offset, length]) // returns normally on EOF
> int actual = read(InputStream, char buffer [,offset, length])
> int actual = readFully(Reader, byte buffer [,offset, length]) // throws EOFException
> int actual = readFully(InputStream, char buffer [,offset, length])
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Closed] (IO-290) Add read/readFully methods to IOUtils

Posted by "Gary D. Gregory (Closed) (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/IO-290?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary D. Gregory closed IO-290.
------------------------------


Version 2.2 has been released and addresses this issue.
                
> Add read/readFully methods to IOUtils
> -------------------------------------
>
>                 Key: IO-290
>                 URL: https://issues.apache.org/jira/browse/IO-290
>             Project: Commons IO
>          Issue Type: New Feature
>            Reporter: Sebb
>             Fix For: 2.2
>
>
> When reading from network etc, it's possible for a read to return before it has read as many bytes as would fit in the buffer.
> Sometimes multiple reads are needed to fulfil the request.
> It would be useful to have read() versions of the skip() methods.
> {code}
> int actual = read(Reader, byte buffer [,offset, length]) // returns normally on EOF
> int actual = read(InputStream, char buffer [,offset, length])
> int actual = readFully(Reader, byte buffer [,offset, length]) // throws EOFException
> int actual = readFully(InputStream, char buffer [,offset, length])
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira