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

(fs) FileChannel.transfer{From,To} methods broken for large files (spec)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 1.4.0
    • 1.4.0
    • core-libs
    • rc1
    • generic
    • generic



      Name: bsC130419 Date: 06/14/2001


      java version "1.4.0-beta"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.0-beta-b65)
      Java HotSpot(TM) Client VM (build 1.4.0-beta-b65, mixed mode)

      The second argument to the transferTo() and transferFrom() methods in the
      FileChannel class is type int, whereas FileChannel size() method returns type
      long. It is not unreasonable to expect to be able to request the transfer of
      all the bytes in the file by passing the value returned by size(). Requiring a
      cast to int really precludes its safe use in this context.
      (Review ID: 126561)
      ======================================================================

            mr Mark Reinhold
            bstrathesunw Bill Strathearn (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: