On Wed, 20 Aug 2025 23:33:16 GMT, John Hendrikx <jhendr...@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

Reply via email to