GC stress fixes and other bugfixes; classpath progress

This commit is contained in:
Joel Dice
2007-07-29 17:32:23 -06:00
parent d5a00c4556
commit a2bd7d0668
27 changed files with 463 additions and 75 deletions

View File

@ -11,7 +11,7 @@ public class BufferedReader extends Reader {
this.buffer = new char[bufferSize];
}
protected BufferedReader(Reader in) {
public BufferedReader(Reader in) {
this(in, 32);
}

View File

@ -7,7 +7,7 @@ public class LineNumberReader extends BufferedReader {
super(in, bufferSize);
}
protected LineNumberReader(Reader in) {
public LineNumberReader(Reader in) {
super(in);
}

View File

@ -9,7 +9,7 @@ public class PrintStream extends OutputStream {
public PrintStream(OutputStream out, boolean autoFlush) {
this.out = out;
this.autoFlush = true;
this.autoFlush = autoFlush;
}
public PrintStream(OutputStream out) {
@ -29,6 +29,13 @@ public class PrintStream extends OutputStream {
if (autoFlush) flush();
} catch (IOException e) { }
}
public synchronized void println() {
try {
out.write(newline);
if (autoFlush) flush();
} catch (IOException e) { }
}
public void write(int c) throws IOException {
out.write(c);

View File

@ -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();