Uploaded image for project: 'Commons IO'
  1. Commons IO
  2. IO-290

Add read/readFully methods to IOUtils

    XMLWordPrintableJSON

Details

    • New Feature
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • 2.2
    • None
    • None

    Description

      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.

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

      Attachments

        Activity

          People

            Unassigned Unassigned
            sebb Sebb
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: