Patrick, How is 'withAutoFlush' expected to behave for subclasses of PrintWriter?
Jason ________________________________________ From: core-libs-dev <[email protected]> on behalf of Patrick Reinhart <[email protected]> Sent: Wednesday, December 21, 2016 3:08 PM To: Roger Riggs Cc: core-libs-dev Subject: Re: Request for Review and Sponsor needed: JDK-8167648: java.io.PrintWriter should have PrintWriter((String|File), Charset) constructors Hi Roger, I tried to put your suggested changes, into the following webrev: http://cr.openjdk.java.net/~reinhapa/reviews/8167648/webrev.01 >>>> - 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⦠-Patrick
