JDK-8268435 : (ch) ChannelInputStream could override readAllBytes
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 17
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2021-06-08
  • Updated: 2021-10-10
  • Resolved: 2021-10-01
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 18
18 b18Fixed
Related Reports
Relates :  
Relates :  
Description
A DESCRIPTION OF THE PROBLEM :
With JDK-8264777, i suggested to overload optimized FileInputStream::readAllBytes.

The same improvement could be done for java.nio's java.nio.file.Files.newInputStream().readAllBytes() - which is still as slow as before.

I suggest to overload sun.nio.ch.ChannelInputStream::readAllBytes with the same algorithm as FileInputStream::readAllBytes. 
See JDK-8264777 / FileInputStream::readAllBytes of JDK17 for details.



Comments
Requested the submitter verify the fix by downloading the latest version of JDK 18 from https://jdk.java.net/18/
10-10-2021

Changeset: 0786d8b7 Author: Brian Burkhalter <bpb@openjdk.org> Date: 2021-10-01 20:15:44 +0000 URL: https://git.openjdk.java.net/jdk/commit/0786d8b7b367e3aa3ffa54a3e339572938378dca
01-10-2021

Moved to JDK to investigate the enhancement.
09-06-2021