RFR: 8264777: Overload optimized FileInputStream::readAllBytes [v2]
Brian Burkhalter
bpb at openjdk.java.net
Tue May 4 20:18:25 UTC 2021
On Tue, 4 May 2021 19:01:45 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Only regular files this far. Are there any particular special files which would be of interest?
>
> On `/proc/cpuinfo` for example, `fstat()` succeeds but `st_size` in `struct stat` is zero. The correct position is however returned by `lseek()`. Apparently this proposal needs to be reworked to expect size zero when the size is in fact non-zero.
Updated to handle `length() == 0` case. Not sure however whether for this case it might not be better just to fall back to `super.readXBytes()` instead.
-------------
PR: https://git.openjdk.java.net/jdk/pull/3845
More information about the core-libs-dev
mailing list