Request for Review and Sponsor needed: JDK-8167648: java.io.PrintWriter should have PrintWriter((String|File), Charset) constructors
jason_mehrens at hotmail.com
Wed Dec 21 21:40:53 UTC 2016
How is 'withAutoFlush' expected to behave for subclasses of PrintWriter?
From: core-libs-dev <core-libs-dev-bounces at openjdk.java.net> on behalf of Patrick Reinhart <patrick at reini.net>
Sent: Wednesday, December 21, 2016 3:08 PM
To: Roger Riggs
Subject: Re: Request for Review and Sponsor needed: JDK-8167648: java.io.PrintWriter should have PrintWriter((String|File), Charset) constructors
I tried to put your suggested changes, into the following webrev:
>>>> - 375: Can this use the new private constructor that will handle psOut.
>>> Here I can not get hold on the encoding at this point or have I missed something here?
>> True, not easily, it is available as a String from OutputStreamWriter.getEncoding() but it would suffer from
>> having to lookup it by name again.
> Right, even the Charset is actually available within the StreamEncoder implementation but not provided to the outside world.
> Also the OutputStreamWriter is in wrapped in a BufferedWriter and would be needed to be extracted from there again in the first place.
Here I left the invocation as it was before…
More information about the core-libs-dev