/* * Decompiled with CFR 0.152. * * Could not load the following classes: * javax.baja.nre.util.TextUtil * javax.baja.xml.XException * javax.baja.xml.XWriter */ package javax.baja.io; import java.io.IOException; import java.io.OutputStream; import java.io.PrintWriter; import java.io.Writer; import javax.baja.nre.util.TextUtil; import javax.baja.xml.XException; import javax.baja.xml.XWriter; public class HtmlWriter extends PrintWriter { public void println(String string) { this.print(string); this.print('\n'); this.flush(); } public HtmlWriter w(Object object) { this.print(object); return this; } public final HtmlWriter w(boolean bl) { this.print(bl); return this; } public final HtmlWriter w(char c) { this.print(c); return this; } public final HtmlWriter w(int n) { this.print(n); return this; } public final HtmlWriter w(long l) { this.print(l); return this; } public final HtmlWriter w(float f) { this.print(f); return this; } public final HtmlWriter w(double d) { this.print(d); return this; } public final HtmlWriter nbsp() { this.print(" "); return this; } public final HtmlWriter nl() { this.print('\n'); return this; } public final HtmlWriter indent(int n) { return this.w(TextUtil.getSpaces((int)n)); } public final HtmlWriter attr(String string, String string2) { return this.w(string).w('=').w('\'').safe(string2).w('\''); } public final HtmlWriter attr(String string, int n) { return this.attr(string, Integer.toString(n)); } public final HtmlWriter attr(String string, float f) { return this.attr(string, Float.toString(f)); } public final HtmlWriter attr(String string, double d) { return this.attr(string, Double.toString(d)); } public final HtmlWriter attr(String string, Object object) { return this.attr(string, String.valueOf(object)); } public final HtmlWriter safe(String string, boolean bl) { try { XWriter.safe((Writer)this, (String)string, (boolean)bl); return this; } catch (IOException iOException) { throw new XException(iOException.toString(), (Throwable)iOException); } } public final HtmlWriter safe(String string) { try { XWriter.safe((Writer)this, (String)string, (boolean)true); return this; } catch (IOException iOException) { throw new XException(iOException.toString(), (Throwable)iOException); } } public final HtmlWriter safe(int n, boolean bl) { try { XWriter.safe((Writer)this, (int)n, (boolean)bl); return this; } catch (IOException iOException) { throw new XException(iOException.toString(), (Throwable)iOException); } } public String href(String string) { return string; } public HtmlWriter a(String string, String string2) { return this.w("").safe(string2).w(""); } public HtmlWriter a(String string) { return this.a(string, string); } public HtmlWriter startTable(boolean bl) { this.w("\n"); return this; } public HtmlWriter trTitle(Object object, int n) { this.w("").w(object).w("\n"); return this; } public HtmlWriter thTitle(Object object) { this.w("").w(object).w("\n"); return this; } public HtmlWriter endTable() { this.w("\n"); return this; } public HtmlWriter tr(Object object) { return this.w("").td(object).w("\n"); } public HtmlWriter tr(Object object, Object object2) { return this.w("").td(object).td(object2).w("\n"); } public HtmlWriter tr(Object object, Object object2, Object object3) { return this.w("").td(object).td(object2).td(object3).w("\n"); } public HtmlWriter tr(Object object, Object object2, Object object3, Object object4) { return this.w("").td(object).td(object2).td(object3).td(object4).w("\n"); } public HtmlWriter tr(Object object, Object object2, Object object3, Object object4, Object object5) { return this.w("").td(object).td(object2).td(object3).td(object4).td(object5).w("\n"); } public HtmlWriter tr(Object object, Object object2, Object object3, Object object4, Object object5, Object object6) { return this.w("").td(object).td(object2).td(object3).td(object4).td(object5).td(object6).w("\n"); } public HtmlWriter tr(Object object, Object object2, Object object3, Object object4, Object object5, Object object6, Object object7) { return this.w("").td(object).td(object2).td(object3).td(object4).td(object5).td(object6).td(object7).w("\n"); } public HtmlWriter th(Object object) { return this.w("").w(object).w(""); } public HtmlWriter td(Object object) { return this.w("").w(object).w(""); } public HtmlWriter(Writer writer) { super(writer); } public HtmlWriter(OutputStream outputStream) { super(outputStream); } }