On Thu, 15 May 2025 10:22:51 GMT, Markus KARG <d...@openjdk.org> wrote:

>> If the source is a `Reader` **and** target is a `Writer`, yes. But what if 
>> it is a native piece of hardware, like an IoT device, which produces / 
>> consumes `CharSequence`?
>
> Also, in JAX-RS for example, you cannot make use of `transferTo` as what you 
> get is a heap object, and what you must forward also is a heap object.

Thanks for the examples. Imho I think that performance sensitive, specialised 
code can invest some lines to put together the best solution for the context 
whereas the majority of code can simply use a convenient 
`reader.readAllAsString()` instead of 
`reader.readAllAsCharSequence().toString()` which is borderline to parody.

-------------

PR Review Comment: https://git.openjdk.org/jdk/pull/24728#discussion_r2090896148

Reply via email to