- 
    Enhancement 
- 
    Resolution: Fixed
- 
     P3 P3
- 
    18
- 
        b10
- 
        generic
- 
        generic
| Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build | 
|---|---|---|---|---|---|---|
| JDK-8277695 | 17.0.3-oracle | Alex Kasko | P3 | Resolved | Fixed | b01 | 
| JDK-8277478 | 17.0.2 | Alex Kasko | P3 | Resolved | Fixed | b06 | 
                    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.
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.
- backported by
- 
                    JDK-8277478 (fc) FileChannel.transferTo() transfers no more than Integer.MAX_VALUE bytes in one call -           
- Resolved
 
-         
- 
                    JDK-8277695 (fc) FileChannel.transferTo() transfers no more than Integer.MAX_VALUE bytes in one call -           
- Resolved
 
-         
- relates to
- 
                    JDK-8272047 java/nio/channels/FileChannel/Transfer2GPlus.java failed with Unexpected transfer size: 2147418112 -           
- Closed
 
-         
- links to
- 
                     Commit
        openjdk/jdk17u/55f8d8c6 Commit
        openjdk/jdk17u/55f8d8c6
- 
                     Commit
        openjdk/jdk/e2c5bfe0 Commit
        openjdk/jdk/e2c5bfe0
- 
                     Review
        openjdk/jdk17u/265 Review
        openjdk/jdk17u/265
- 
                     Review
        openjdk/jdk/4940 Review
        openjdk/jdk/4940
             (2 links to)