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

FileInputStream.transferTo may not transfer all bytes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P4 P4
    • None
    • 22
    • core-libs
    • None

      FIS.transferTo assumes that all bytes are transferred by FC.transferTo. There are cases where a short write is possible, meaning not all bytes that are transferred. FIS.transferTo needs to use a loop to ensure all bytes are transferred.

      In passing, the {@inheritDoc} is not needed.

            bpb Brian Burkhalter
            alanb Alan Bateman
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: