mirror of
https://github.com/corda/corda.git
synced 2025-06-12 20:28:18 +00:00
GC stress fixes and other bugfixes; classpath progress
This commit is contained in:
@ -9,13 +9,21 @@ public class PrintWriter extends Writer {
|
||||
|
||||
public PrintWriter(Writer out, boolean autoFlush) {
|
||||
this.out = out;
|
||||
this.autoFlush = true;
|
||||
this.autoFlush = autoFlush;
|
||||
}
|
||||
|
||||
public PrintWriter(Writer out) {
|
||||
this(out, false);
|
||||
}
|
||||
|
||||
public PrintWriter(OutputStream out, boolean autoFlush) {
|
||||
this(new OutputStreamWriter(out), autoFlush);
|
||||
}
|
||||
|
||||
public PrintWriter(OutputStream out) {
|
||||
this(out, false);
|
||||
}
|
||||
|
||||
public synchronized void print(String s) {
|
||||
try {
|
||||
out.write(s.toCharArray());
|
||||
@ -30,6 +38,13 @@ public class PrintWriter extends Writer {
|
||||
} catch (IOException e) { }
|
||||
}
|
||||
|
||||
public synchronized void println() {
|
||||
try {
|
||||
out.write(newline);
|
||||
if (autoFlush) flush();
|
||||
} catch (IOException e) { }
|
||||
}
|
||||
|
||||
public void write(char[] buffer, int offset, int length) throws IOException {
|
||||
out.write(buffer, offset, length);
|
||||
if (autoFlush) flush();
|
||||
|
Reference in New Issue
Block a user