RFR: 8067661 transferTo() for Appendable
Alan.Bateman at oracle.com
Sun Nov 5 10:02:14 UTC 2017
On 05/11/2017 08:34, Patrick Reinhart wrote:
> After discussing  for about the API for the new transferTo() method on Appendable, I have created an initial
> Version of the actual implementation for review:
> Any comments/suggestions are welcome, also I will need a sponsor for it at the end…
CharBuffer may need special attention. It implements both Readable and
Appendable and additional creates the potential for
BufferOverflowException or ReadOnlyBufferException when the target is a
CharBuffer. This is only so much that the javadoc in Readable can
specify of course.
One possibly is to override the method in CharBuffer so that you can
clarify some of this behavior. This would allow you to specify that it
works like target.put(src) when both are char buffers for example - that
probably is a nice property to specify anyway.
Are you planning to add an @implSpec to specify the default implementation?
More information about the core-libs-dev