On Thu, 21 Aug 2025 17:33:07 GMT, Andy Goryachev <ango...@openjdk.org> wrote:
> I like the `Supplier` idea, though I am not sure how the async path would > work (unless you add the `closeStream` parameter). When you have a `Supplier<InputStream>` instead of `URL` or plain `InputStream` it will look like this: new Image(() -> new FileInputStream("xyz")); Since the supplier creates a new stream each time, it makes sense that the caller of the supplier is also the one to close it, whether or not that is sync or async. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1875#issuecomment-3213893290