Commons IO
  1. Commons IO
  2. IO-290

Add read/readFully methods to IOUtils

    Details

    • Type: New Feature New Feature
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.2
    • Component/s: None
    • Labels:
      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])
      

        Activity

        Transition Time In Source Status Execution Times Last Executer Last Execution Date
        Open Open Resolved Resolved
        21d 9h 34m 1 Sebb 16/Nov/11 02:48
        Resolved Resolved Closed Closed
        134d 18h 43m 1 Gary Gregory 29/Mar/12 21:32
        Gary Gregory made changes -
        Status Resolved [ 5 ] Closed [ 6 ]
        Hide
        Gary Gregory added a comment -

        Version 2.2 has been released and addresses this issue.

        Show
        Gary Gregory added a comment - Version 2.2 has been released and addresses this issue.
        Sebb made changes -
        Field Original Value New Value
        Status Open [ 1 ] Resolved [ 5 ]
        Fix Version/s 2.2 [ 12318448 ]
        Resolution Fixed [ 1 ]
        Sebb created issue -

          People

          • Assignee:
            Unassigned
            Reporter:
            Sebb
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development