RFR: 8284638: store skip buffers in InputStream Object [v15]
XenoAmess
duke at openjdk.java.net
Sun May 29 23:34:48 UTC 2022
On Sun, 29 May 2022 18:23:03 GMT, Sergey Kuksenko <skuksenko at openjdk.org> wrote:
>> XenoAmess has updated the pull request incrementally with one additional commit since the last revision:
>>
>> invert if; refine javadoc.
>
> Another InputStreams cleaning direction.
>
> Many InputStream subclasses have read(byte[],...) as a primary implementation. Somehow they should implement 1-byte reading (read()) via array reading. All imaginable strategies are used:
> - allocate byte[1] per read() invocation
> - cache byte[1] preallocated
> - cache byte[1], allocation on demand
> - share 1-byte read buffer and skip buffer, as preallocating and allocating on demand.
> - etc
>
> So cleaning and making consistent all 1-byte read implementations - also may be valuable.
@kuksenko good suggestions. I would have a try when have time.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5872
More information about the core-libs-dev
mailing list