JDK-8067661: transferTo proposal for Appendable

Patrick Reinhart patrick at reini.net
Thu Nov 2 19:55:14 UTC 2017

Hi Alan,

> Am 02.11.2017 um 20:34 schrieb Alan Bateman <Alan.Bateman at oracle.com>:
> On 02/11/2017 18:36, Patrick Reinhart wrote:
>> :
>> That would read then something like this:
>>  * Reads all characters from this readable and writes the characters to
>>  * the given appendable in the order that they are read. On return, the
>>  * source of characters will be at its end.
> Yes, or even „Reads all characters from this source …“

Updated accordingly:


>> :
>> The second part:
>>  * This method may block indefinitely reading from the readable, or
>>  * writing to the appendable. Where this source or the appendable is
>>  * {@link java.io.AutoCloseable closeable}, then the behavior when either are
>>  * <i>asynchronously closed</i>, or the thread interrupted during the transfer,
>>  * is highly readable and appendable specific, and therefore not specified.
>> The only thing that worries me is that the @link is pointing form java.lang to java.io stuff, which I tried to prevent.
> The read method reads from a CharBuffer and throws IOException so I think this is okay.
> So are you planning to adding an implementation + tests for this?

If we are all happy with the API so far, I could start adding an initial implementation and test…


More information about the core-libs-dev mailing list