pre-RFR (s): 8049847: Enhance PrintWriter line.separator handling

Alan Bateman Alan.Bateman at
Sun Jan 4 20:25:57 UTC 2015

On 04/01/2015 19:18, Xueming Shen wrote:
> :
> I agree with Alan that the general interface "Appendable" probably 
> should not get
> into the specific "formatting" functionality here. And I also think 
> the "line.separator"
> should not be in the "Writer" as well, writer/reader does not deal 
> with "formatting",
> only couple "special" writers need to work with "line" 
I've often wondered about BufferedReader/BufferedWriter supporting 
lines, it often feels like the readLine and newLine methods should have 
been further up in the hierarchy in Reader and Writer so the BufferedXXX 
types just adds buffering. I realize of course that newLine might be 
very inefficient without buffering. Do have all the history? I'm 
wondering if there is merit looking at this again as it could be useful 
beyond the case that Claes wants to address. If Writer did define 
newLine then then the proposed lineSeperator wouldn't be needed.


More information about the core-libs-dev mailing list