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

Alan Bateman alanb at openjdk.java.net
Tue May 25 07:54:15 UTC 2021


On Mon, 24 May 2021 00:33:06 GMT, Roger Riggs <rriggs at openjdk.org> wrote:

>> Methods are added to java.lang.Process to read and write characters and lines from and to a spawned Process.
>> The Charset used to encode and decode characters to bytes can be specified or use the
>> operating system native encoding as is available from the "native.encoding" system property.
>
> Roger Riggs has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Added throws for NPE, delegated zero-arg methods that use native.encoding to
>   the 1-arg method with a charset, added tests for Redirect cases where the streams are null-input or null-output streams.

The updated javadoc addresses most of my points. The clarification to inputReader/errorReader about malformed input looks good but we will need the equivalent in outputWriter for the unmappable character case.
I assume the "not null" can be dropped from the description of the charset parameter as NPE is now specified.

-------------

PR: https://git.openjdk.java.net/jdk/pull/4134


More information about the core-libs-dev mailing list