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)
======================================================================
- relates to
-
JDK-4638365 (fs) FileChannel.transfer{From,To}, {Scatter,Gather}ingByteChannel & large files
-
- Resolved
-