Added functionality to flush() and close()

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@1255 379699f6-c40d-0410-875b-85095c16579e
master
hoenicke 25 years ago
parent 34081d2e06
commit aca625aa34
  1. 10
      jode/jode/decompiler/TabbedPrintWriter.java

@ -562,7 +562,7 @@ public class TabbedPrintWriter {
println(); println();
} }
public void println() { public void flushLine() {
currentBP.endPos = currentLine.length(); currentBP.endPos = currentLine.length();
// pw.print(indentStr); // pw.print(indentStr);
@ -578,13 +578,17 @@ public class TabbedPrintWriter {
// pw.println(); // pw.println();
pw.print(indentStr); pw.print(indentStr);
currentBP.printLines(currentIndent, currentLine.toString()); currentBP.printLines(currentIndent, currentLine.toString());
pw.println();
currentLine.setLength(0); currentLine.setLength(0);
currentBP = new BreakPoint(null, 0); currentBP = new BreakPoint(null, 0);
currentBP.startOp(DONT_BREAK, 1, 0); currentBP.startOp(DONT_BREAK, 1, 0);
} }
public void println() {
flushLine();
pw.println();
}
public void print(String str) { public void print(String str) {
currentLine.append(str); currentLine.append(str);
} }
@ -751,10 +755,12 @@ public class TabbedPrintWriter {
} }
public void flush() { public void flush() {
flushLine();
pw.flush(); pw.flush();
} }
public void close() { public void close() {
flushLine();
pw.close(); pw.close();
} }
} }

Loading…
Cancel
Save