Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8260694

(fc) Clarify FileChannel.transferFrom to better describe "no bytes available" case

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 17
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • Resolved In Build:
      b11

      Description

      Background in JDK-8260486, and discussion in https://mail.openjdk.java.net/pipermail/nio-dev/2021-January/008094.html

      The proposal is to add a note to the transferFrom API docs to make it clearer a returning value of 0, meaning no bytes available, is ambiguous when the source channel is configured non-blocking. It could mean the source channel is at EOF or could mean that there are just no bytes available without blocking.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              mli Hamlin Li
              Reporter:
              mli Hamlin Li
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: