JDK-8067661: transferTo proposal for Appendable

Brian Burkhalter brian.burkhalter at oracle.com
Tue Nov 14 00:34:33 UTC 2017

Hi Patrick,

More editorial comments ... ;-)

In Readable.java these lines

  73      * Depending on which class implements the appendable, there may be a limit
  74      * of data that can written to which in turn could lead to an exception.

are a bit unclear to me. Do you mean to say a limit on the amount of data, i.e., number of characters, which may be transferred? If so, then perhaps something like this?:

“Note that it is possible an implementing class may limit the number of characters which may be transferred and throw an exception if this limit is exceeded.”

In X-Buffer.java.template at lines 1556-1561 the following might be considered as an alternative wording:

“The implementation transfers data by one of two means. If the given {@link Appendable} is a {@link CharBuffer}, {@code put(CharBuffer)} is invoked on it with this buffer as parameter. Otherwise {@link Appendable#append(CharSequence, int, int)} is invoked on it with this buffer and its position and length as parameters.”



On Nov 13, 2017, at 2:23 PM, Patrick Reinhart <patrick at reini.net> wrote:

> Latest changes:
> http://cr.openjdk.java.net/~reinhapa/reviews/8067661/webrev.03

More information about the core-libs-dev mailing list