Use the platform specific newline character/string

git-svn-id: https://smali.googlecode.com/svn/trunk@690 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
JesusFreke@JesusFreke.com 2010-04-03 23:02:31 +00:00
parent adb1511f4e
commit 306fe8753a

View File

@ -36,6 +36,7 @@ public class IndentingWriter extends Writer {
private final char[] buffer = new char[16]; private final char[] buffer = new char[16];
private int indentLevel = 0; private int indentLevel = 0;
private boolean beginningOfLine; private boolean beginningOfLine;
private static final String newLine = System.getProperty("line.separator");
protected IndentingWriter(Writer writer) { protected IndentingWriter(Writer writer) {
this.writer = writer; this.writer = writer;
@ -45,7 +46,7 @@ public class IndentingWriter extends Writer {
public void write(int chr) throws IOException { public void write(int chr) throws IOException {
//synchronized(lock) { //synchronized(lock) {
if (chr == '\n') { if (chr == '\n') {
writer.write(chr); writer.write(newLine);
beginningOfLine = true; beginningOfLine = true;
} else { } else {
if (beginningOfLine) { if (beginningOfLine) {