X-Git-Url: http://source.jalview.org/gitweb/?p=jalviewjs.git;a=blobdiff_plain;f=site%2Fj2s%2Fjava%2Fnet%2FURLConnection.js;h=eca2cd68abb4ccccf7fe80960c67e28b3a552431;hp=2964fa5f5cb4d5bb74d4c02dbf6579ceefa4c6be;hb=b9b7a352eee79b7764c3b09c9d19663075061d8c;hpb=7301a2415adab88038b291fc54caeeb3a5a47a44 diff --git a/site/j2s/java/net/URLConnection.js b/site/j2s/java/net/URLConnection.js index 2964fa5..eca2cd6 100644 --- a/site/j2s/java/net/URLConnection.js +++ b/site/j2s/java/net/URLConnection.js @@ -1,56 +1,56 @@ -Clazz.declarePackage ("java.net"); -Clazz.load (null, "java.net.URLConnection", ["java.lang.IllegalStateException", "$.NullPointerException", "java.net.UnknownServiceException", "JU.Lst"], function () { -c$ = Clazz.decorateAsClass (function () { -this.url = null; -this.doInput = true; -this.doOutput = false; -this.connected = false; -this.requests = null; -Clazz.instantialize (this, arguments); -}, java.net, "URLConnection"); -Clazz.defineMethod (c$, "setDoInput", -function (doinput) { -if (this.connected) throw new IllegalStateException ("Already connected"); -this.doInput = doinput; -}, "~B"); -Clazz.defineMethod (c$, "getDoInput", -function () { -return this.doInput; -}); -Clazz.defineMethod (c$, "setDoOutput", -function (dooutput) { -if (this.connected) throw new IllegalStateException ("Already connected"); -this.doOutput = dooutput; -}, "~B"); -Clazz.defineMethod (c$, "getDoOutput", -function () { -return this.doOutput; -}); -Clazz.makeConstructor (c$, -function (url) { -this.url = url; -}, "java.net.URL"); -Clazz.defineMethod (c$, "getURL", -function () { -return this.url; -}); -Clazz.defineMethod (c$, "getInputStream", -function () { -throw new java.net.UnknownServiceException ("protocol doesn't support input"); -}); -Clazz.defineMethod (c$, "getOutputStream", -function () { -throw new java.net.UnknownServiceException ("protocol doesn't support output"); -}); -Clazz.defineMethod (c$, "setRequestProperty", -function (key, value) { -if (this.connected) throw new IllegalStateException ("Already connected"); -if (key == null) throw new NullPointerException ("key is null"); -if (this.requests == null) this.requests = new JU.Lst (); -for (var i = this.requests.size (); --i >= 0; ) if (this.requests.get (i)[0].equals (key)) { -this.requests.get (i)[1] = value; -return; -} -this.requests.addLast ( Clazz.newArray (-1, [key, value])); -}, "~S,~S"); -}); +Clazz.declarePackage ("java.net"); +Clazz.load (null, "java.net.URLConnection", ["java.lang.IllegalStateException", "$.NullPointerException", "java.net.UnknownServiceException", "JU.Lst"], function () { +c$ = Clazz.decorateAsClass (function () { +this.url = null; +this.doInput = true; +this.doOutput = false; +this.connected = false; +this.requests = null; +Clazz.instantialize (this, arguments); +}, java.net, "URLConnection"); +Clazz.defineMethod (c$, "setDoInput", +function (doinput) { +if (this.connected) throw new IllegalStateException ("Already connected"); +this.doInput = doinput; +}, "~B"); +Clazz.defineMethod (c$, "getDoInput", +function () { +return this.doInput; +}); +Clazz.defineMethod (c$, "setDoOutput", +function (dooutput) { +if (this.connected) throw new IllegalStateException ("Already connected"); +this.doOutput = dooutput; +}, "~B"); +Clazz.defineMethod (c$, "getDoOutput", +function () { +return this.doOutput; +}); +Clazz.makeConstructor (c$, +function (url) { +this.url = url; +}, "java.net.URL"); +Clazz.defineMethod (c$, "getURL", +function () { +return this.url; +}); +Clazz.defineMethod (c$, "getInputStream", +function () { +throw new java.net.UnknownServiceException ("protocol doesn't support input"); +}); +Clazz.defineMethod (c$, "getOutputStream", +function () { +throw new java.net.UnknownServiceException ("protocol doesn't support output"); +}); +Clazz.defineMethod (c$, "setRequestProperty", +function (key, value) { +if (this.connected) throw new IllegalStateException ("Already connected"); +if (key == null) throw new NullPointerException ("key is null"); +if (this.requests == null) this.requests = new JU.Lst (); +for (var i = this.requests.size (); --i >= 0; ) if (this.requests.get (i)[0].equals (key)) { +this.requests.get (i)[1] = value; +return; +} +this.requests.addLast ( Clazz.newArray (-1, [key, value])); +}, "~S,~S"); +});