RFR: 8361286: Allow enabling of background loading for images loaded from an InputStream [v4]
Andy Goryachev
angorya at openjdk.org
Thu Aug 21 16:58:04 UTC 2025
On Wed, 20 Aug 2025 23:33:16 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Support background loading of raw input streams
>>
>> - Fixed generics (mix up of two ImageLoader types)
>> - Removed unused code for handling headers, methods, request parameters
>> - Use `long` for progress as streams may exceed 2 GB
>> - Improved documentation of Image regarding background loading
>
> John Hendrikx has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix typo
re: closing stream
I wonder if we should close the stream in both sync and async variants (and document that). I would say there should be no reason not to close - suggesting that if the application wants not to close it's surely a bad choice for the application.
For example, one can think of a situation where multiple images are stored within the same stream, but there should be a reliable way for the application to specify the size of each image (and then the app can provide a derived InputStream which EOFs when the end of an image is reached).
Another alternative is to add another boolean `closeStream`.
What do you think?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1875#issuecomment-3211401573
More information about the openjfx-dev
mailing list