RFR: 8191441: (Process) add Readers and Writer access to java.lang.Process streams

Roger Riggs roger.riggs at oracle.com
Fri May 21 21:44:16 UTC 2021


Hi,

Yes, I'm testing BufferedWriter-> OutputStreamWriter now.
And it can be wrapped in PrintWriter if someone is eager to get the 
missing text formatting
or auto-flush behaviors.

Roger


On 5/21/21 5:23 PM, Rémi Forax wrote:
> 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