JDK-8067661: transferTo proposal for Appendable

Alan Bateman Alan.Bateman at oracle.com
Thu Nov 2 19:34:23 UTC 2017


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 ...".


> :
> 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?

-Alan




More information about the core-libs-dev mailing list