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

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

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 17
    • None
    • core-libs
    • 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

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

              Dates

                Created:
                Updated:
                Resolved: