JDK-8191532 : Add Readable::transferTo(Appendable)
  • Type: CSR
  • Component: core-libs
  • Sub-Component: java.lang
  • Priority: P3
  • Status: Closed
  • Resolution: Withdrawn
  • Submitted: 2017-11-19
  • Updated: 2018-03-19
  • Resolved: 2018-03-19
Related Reports
CSR :  
Description
Summary
-------

Add new API for transferring data from a Readable to an Appendable like already existing InputStream.transferTo(OutputStream).

This CSR covers the enhancement request:
JDK-8066870


Problem
-------

In order to transfer all data from a Readable to an Appendable mostly the same code has to be written or an external library has to be used instead. This overhead could be reduced by introducing such behaviour directly within the JDK as already available on InputStream for byte data.

Solution
--------

Add an new API that implements the behaviour that else needed to be written by the user.

* http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-November/049730.html
* http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-November/049806.html

Specification
-------------

Detailed changes see webrev

http://cr.openjdk.java.net/~reinhapa/reviews/8066870/webrev.00

Comments
We need to take following comment into account: http://mail.openjdk.java.net/pipermail/core-libs-dev/2017-November/050060.html I think we should go for a static transfer method or leave that out completely..
05-12-2017

So I think we are done with the discussion on core-libs-dev so it needs Patrick is to update the CSR and finalize it.
05-12-2017