< prev index next >

src/java.base/share/classes/java/io/OutputStreamWriter.java

Print this page
rev 15365 : imported patch 8163517-Various-cleanup-in-java-io-code

*** 231,256 **** se.write(str, off, len); } @Override public Writer append(CharSequence csq, int start, int end) throws IOException { ! if (csq == null) { ! write("null".subSequence(start, end).toString()); ! return this; ! } else { return append(csq.subSequence(start, end)); } - } @Override public Writer append(CharSequence csq) throws IOException { ! if (csq == null) { ! se.write("null"); ! } else if (csq instanceof CharBuffer) { se.write((CharBuffer) csq); } else { ! se.write(csq.toString()); } return this; } /** --- 231,250 ---- se.write(str, off, len); } @Override public Writer append(CharSequence csq, int start, int end) throws IOException { ! if (csq == null) csq = "null"; return append(csq.subSequence(start, end)); } @Override public Writer append(CharSequence csq) throws IOException { ! if (csq instanceof CharBuffer) { se.write((CharBuffer) csq); } else { ! se.write(String.valueOf(csq)); } return this; } /**
< prev index next >