RFR: 8191441: (Process) add Readers and Writer access to java.lang.Process streams
Rémi Forax
forax at openjdk.java.net
Fri May 21 21:23:58 UTC 2021
On Thu, 20 May 2021 20:37:57 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
> OutputStreamWriter would be a better choice with that in mind. It does not have the convenience methods for converting various types to strings but would not hide the exceptions. Developers could wrap it in a PrintWriter to get the convenience and take on the responsibility of dealing with exceptions by polling.
yes, instead of OutputStreamWriter, i wonder if BufferedWriter is not better given that reader part uses BufferedReader and that is mirror java.nio.file.Files which also uses BufferedReader/BufferedWriter as types for the pair reader/writer.
-------------
PR: https://git.openjdk.java.net/jdk/pull/4134
More information about the core-libs-dev
mailing list