1 Clazz.declarePackage ("JU");
2 Clazz.load (["java.net.URLConnection"], "JU.AjaxURLConnection", ["JU.AU", "$.Rdr", "$.SB"], function () {
3 c$ = Clazz.decorateAsClass (function () {
6 Clazz.instantialize (this, arguments);
7 }, JU, "AjaxURLConnection", java.net.URLConnection);
8 Clazz.defineMethod (c$, "doAjax",
11 return Jmol._doAjax(this.url, this.postOut, this.bytesOut);
13 Clazz.overrideMethod (c$, "connect",
16 Clazz.defineMethod (c$, "outputBytes",
18 this.bytesOut = bytes;
20 Clazz.defineMethod (c$, "outputString",
24 Clazz.overrideMethod (c$, "getInputStream",
27 var o = this.doAjax ();
28 if (JU.AU.isAB (o)) is = JU.Rdr.getBIS (o);
29 else if (Clazz.instanceOf (o, JU.SB)) is = JU.Rdr.getBIS (JU.Rdr.getBytesFromSB (o));
30 else if (Clazz.instanceOf (o, String)) is = JU.Rdr.getBIS ((o).getBytes ());
33 Clazz.defineMethod (c$, "getContents",
35 return this.doAjax ();