home *** CD-ROM | disk | FTP | other *** search
- package java.io;
-
- public class PrintWriter extends Writer {
- private Writer out;
- private boolean autoFlush;
- private boolean trouble;
- private String lineSeparator;
-
- public PrintWriter(Writer var1) {
- this(var1, false);
- }
-
- public PrintWriter(Writer var1, boolean var2) {
- super(var1);
- this.autoFlush = false;
- this.trouble = false;
- this.out = var1;
- this.autoFlush = var2;
- this.lineSeparator = System.getProperty("line.separator");
- }
-
- public PrintWriter(OutputStream var1) {
- this(var1, false);
- }
-
- public PrintWriter(OutputStream var1, boolean var2) {
- this((Writer)(new BufferedWriter(new OutputStreamWriter(var1))), var2);
- }
-
- private void ensureOpen() throws IOException {
- if (this.out == null) {
- throw new IOException("Stream closed");
- }
- }
-
- public void flush() {
- try {
- Object var1 = super.lock;
- synchronized(var1){}
-
- try {
- this.ensureOpen();
- this.out.flush();
- } catch (Throwable var4) {
- throw var4;
- }
-
- } catch (IOException var5) {
- this.trouble = true;
- }
- }
-
- public void close() {
- try {
- Object var1 = super.lock;
- synchronized(var1){}
-
- try {
- if (this.out != null) {
- this.out.close();
- this.out = null;
- return;
- }
- } catch (Throwable var5) {
- throw var5;
- }
-
- } catch (IOException var6) {
- this.trouble = true;
- }
- }
-
- public boolean checkError() {
- if (this.out != null) {
- this.flush();
- }
-
- return this.trouble;
- }
-
- protected void setError() {
- this.trouble = true;
- }
-
- public void write(int var1) {
- try {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.ensureOpen();
- this.out.write(var1);
- } catch (Throwable var6) {
- throw var6;
- }
-
- } catch (InterruptedIOException var7) {
- Thread.currentThread().interrupt();
- } catch (IOException var8) {
- this.trouble = true;
- }
- }
-
- public void write(char[] var1, int var2, int var3) {
- try {
- Object var4 = super.lock;
- synchronized(var4){}
-
- try {
- this.ensureOpen();
- this.out.write(var1, var2, var3);
- } catch (Throwable var8) {
- throw var8;
- }
-
- } catch (InterruptedIOException var9) {
- Thread.currentThread().interrupt();
- } catch (IOException var10) {
- this.trouble = true;
- }
- }
-
- public void write(char[] var1) {
- this.write((char[])var1, 0, var1.length);
- }
-
- public void write(String var1, int var2, int var3) {
- try {
- Object var4 = super.lock;
- synchronized(var4){}
-
- try {
- this.ensureOpen();
- this.out.write(var1, var2, var3);
- } catch (Throwable var8) {
- throw var8;
- }
-
- } catch (InterruptedIOException var9) {
- Thread.currentThread().interrupt();
- } catch (IOException var10) {
- this.trouble = true;
- }
- }
-
- public void write(String var1) {
- this.write((String)var1, 0, var1.length());
- }
-
- private void newLine() {
- try {
- Object var1 = super.lock;
- synchronized(var1){}
-
- try {
- this.ensureOpen();
- this.out.write(this.lineSeparator);
- if (this.autoFlush) {
- this.out.flush();
- }
- } catch (Throwable var5) {
- throw var5;
- }
-
- } catch (InterruptedIOException var6) {
- Thread.currentThread().interrupt();
- } catch (IOException var7) {
- this.trouble = true;
- }
- }
-
- public void print(boolean var1) {
- this.write(var1 ? "true" : "false");
- }
-
- public void print(char var1) {
- this.write(String.valueOf(var1));
- }
-
- public void print(int var1) {
- this.write(String.valueOf(var1));
- }
-
- public void print(long var1) {
- this.write(String.valueOf(var1));
- }
-
- public void print(float var1) {
- this.write(String.valueOf(var1));
- }
-
- public void print(double var1) {
- this.write(String.valueOf(var1));
- }
-
- public void print(char[] var1) {
- this.write(var1);
- }
-
- public void print(String var1) {
- if (var1 == null) {
- var1 = "null";
- }
-
- this.write(var1);
- }
-
- public void print(Object var1) {
- this.write(String.valueOf(var1));
- }
-
- public void println() {
- Object var1 = super.lock;
- synchronized(var1){}
-
- try {
- this.newLine();
- } catch (Throwable var3) {
- throw var3;
- }
-
- }
-
- public void println(boolean var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void println(char var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void println(int var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void println(long var1) {
- Object var3 = super.lock;
- synchronized(var3){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var5) {
- throw var5;
- }
-
- }
-
- public void println(float var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void println(double var1) {
- Object var3 = super.lock;
- synchronized(var3){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var5) {
- throw var5;
- }
-
- }
-
- public void println(char[] var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void println(String var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
-
- public void println(Object var1) {
- Object var2 = super.lock;
- synchronized(var2){}
-
- try {
- this.print(var1);
- this.newLine();
- } catch (Throwable var4) {
- throw var4;
- }
-
- }
- }
-