InputStream read() not behaving as expected by Interface Javadoc

XMLWordPrintableJSON

    • Type: Improvement
    • Resolution: Done
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: GridFS
    • None
    • None
    • Fully Compatible
    • None
    • None
    • None
    • None
    • None
    • None

      The read(final byte[] b, final int off, final int len) method is supposed to try to retrieve the number of bytes specified in 'len'. The current implementation however only retrieves one chunk and reads that chunk. In most cases this leads to less bytes being retrieved than requested. This usually puts the burden on the application to loop over that method until the number of requested bytes could be retrieved. It should be considered if this work can be handled by the driver - at least for the 3.0 update. Unless someone expects the current behaviour, which differs from the javadoc for the Inputstream (which is the only documentation I could find), this change should not break backwards compatibility.

            Assignee:
            Unassigned
            Reporter:
            Steve Hummingbird
            None
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: