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

(fc) FileChannel.transferTo() transfers no more than Integer.MAX_VALUE bytes in one call

    XMLWordPrintable

    Details

    • Subcomponent:
    • Resolved In Build:
      b10
    • CPU:
      generic
    • OS:
      generic

      Backports

        Description

        The transferTo() method in sun.nio.fs.FileChannelImpl clamps the number of bytes to transfer to Integer.MAX_VALUE:

                int icount = (int)Math.min(count, Integer.MAX_VALUE);
                if ((sz - position) < icount)
                    icount = (int)(sz - position);

        The attached test class "Transfer2GPlus" verifies this problem.

          Attachments

            Issue Links

              Activity

                People

                Assignee:
                bpb Brian Burkhalter
                Reporter:
                bpb Brian Burkhalter
                Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                  Dates

                  Created:
                  Updated:
                  Resolved: