Merge branch 'master' of https://source.jalview.org/git/jalviewjs.git
[jalviewjs.git] / site / j2s / java / util / Properties.js
index 9e7487b..7cb9ab5 100644 (file)
-Clazz.declarePackage ("java.util");\r
-Clazz.load (["java.util.Hashtable"], "java.util.Properties", ["java.lang.IllegalArgumentException"], function () {\r
-c$ = Clazz.decorateAsClass (function () {\r
-this.defaults = null;\r
-if (!Clazz.isClassDefined ("java.util.Properties.LineReader")) {\r
-java.util.Properties.$Properties$LineReader$ ();\r
-}\r
-Clazz.instantialize (this, arguments);\r
-}, java.util, "Properties", java.util.Hashtable);\r
-Clazz.makeConstructor (c$, \r
-function () {\r
-this.construct (null);\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (defaults) {\r
-Clazz.superConstructor (this, java.util.Properties, []);\r
-this.defaults = defaults;\r
-}, "java.util.Properties");\r
-Clazz.defineMethod (c$, "setProperty", \r
-function (key, value) {\r
-return this.put (key, value);\r
-}, "~S,~S");\r
-Clazz.defineMethod (c$, "load", \r
-function (reader) {\r
-this.load0 (Clazz.innerTypeInstance (java.util.Properties.LineReader, this, null, reader));\r
-}, "java.io.Reader");\r
-Clazz.defineMethod (c$, "load", \r
-function (inStream) {\r
-this.load0 (Clazz.innerTypeInstance (java.util.Properties.LineReader, this, null, inStream));\r
-}, "java.io.InputStream");\r
-Clazz.defineMethod (c$, "load0", \r
- function (lr) {\r
-var convtBuf =  Clazz.newCharArray (1024, '\0');\r
-var limit;\r
-var keyLen;\r
-var valueStart;\r
-var c;\r
-var hasSep;\r
-var precedingBackslash;\r
-while ((limit = lr.readLine ()) >= 0) {\r
-c = String.fromCharCode ( 0);\r
-keyLen = 0;\r
-valueStart = limit;\r
-hasSep = false;\r
-precedingBackslash = false;\r
-while (keyLen < limit) {\r
-c = lr.lineBuf[keyLen];\r
-if ((c == '=' || c == ':') && !precedingBackslash) {\r
-valueStart = keyLen + 1;\r
-hasSep = true;\r
-break;\r
-} else if ((c == ' ' || c == '\t' || c == '\f') && !precedingBackslash) {\r
-valueStart = keyLen + 1;\r
-break;\r
-}if (c == '\\') {\r
-precedingBackslash = !precedingBackslash;\r
-} else {\r
-precedingBackslash = false;\r
-}keyLen++;\r
-}\r
-while (valueStart < limit) {\r
-c = lr.lineBuf[valueStart];\r
-if (c != ' ' && c != '\t' && c != '\f') {\r
-if (!hasSep && (c == '=' || c == ':')) {\r
-hasSep = true;\r
-} else {\r
-break;\r
-}}valueStart++;\r
-}\r
-var key = this.loadConvert (lr.lineBuf, 0, keyLen, convtBuf);\r
-var value = this.loadConvert (lr.lineBuf, valueStart, limit - valueStart, convtBuf);\r
-this.put (key, value);\r
-}\r
-}, "java.util.Properties.LineReader");\r
-Clazz.defineMethod (c$, "loadConvert", \r
- function ($in, off, len, convtBuf) {\r
-if (convtBuf.length < len) {\r
-var newLen = len * 2;\r
-if (newLen < 0) {\r
-newLen = 2147483647;\r
-}convtBuf =  Clazz.newCharArray (newLen, '\0');\r
-}var aChar;\r
-var out = convtBuf;\r
-var outLen = 0;\r
-var end = off + len;\r
-while (off < end) {\r
-aChar = $in[off++];\r
-if (aChar == '\\') {\r
-aChar = $in[off++];\r
-if (aChar == 'u') {\r
-var value = 0;\r
-for (var i = 0; i < 4; i++) {\r
-aChar = $in[off++];\r
-switch (aChar) {\r
-case '0':\r
-case '1':\r
-case '2':\r
-case '3':\r
-case '4':\r
-case '5':\r
-case '6':\r
-case '7':\r
-case '8':\r
-case '9':\r
-value = (value << 4) + aChar.charCodeAt (0) - 48;\r
-break;\r
-case 'a':\r
-case 'b':\r
-case 'c':\r
-case 'd':\r
-case 'e':\r
-case 'f':\r
-value = (value << 4) + 10 + aChar.charCodeAt (0) - 97;\r
-break;\r
-case 'A':\r
-case 'B':\r
-case 'C':\r
-case 'D':\r
-case 'E':\r
-case 'F':\r
-value = (value << 4) + 10 + aChar.charCodeAt (0) - 65;\r
-break;\r
-default:\r
-throw  new IllegalArgumentException ("Malformed \\uxxxx encoding.");\r
-}\r
-}\r
-out[outLen++] = String.fromCharCode (value);\r
-} else {\r
-if (aChar == 't') aChar = '\t';\r
- else if (aChar == 'r') aChar = '\r';\r
- else if (aChar == 'n') aChar = '\n';\r
- else if (aChar == 'f') aChar = '\f';\r
-out[outLen++] = aChar;\r
-}} else {\r
-out[outLen++] = aChar;\r
-}}\r
-return  String.instantialize (out, 0, outLen);\r
-}, "~A,~N,~N,~A");\r
-Clazz.defineMethod (c$, "getProperty", \r
-function (key) {\r
-var oval = Clazz.superCall (this, java.util.Properties, "get", [key]);\r
-var sval = (Clazz.instanceOf (oval, String)) ? oval : null;\r
-return ((sval == null) && (this.defaults != null)) ? this.defaults.getProperty (key) : sval;\r
-}, "~S");\r
-Clazz.defineMethod (c$, "getProperty", \r
-function (key, defaultValue) {\r
-var val = this.getProperty (key);\r
-return (val == null) ? defaultValue : val;\r
-}, "~S,~S");\r
-Clazz.defineMethod (c$, "propertyNames", \r
-function () {\r
-var h =  new java.util.Hashtable ();\r
-this.enumerate (h);\r
-return h.keys ();\r
-});\r
-Clazz.defineMethod (c$, "stringPropertyNames", \r
-function () {\r
-var h =  new java.util.Hashtable ();\r
-this.enumerateStringProperties (h);\r
-return h.keySet ();\r
-});\r
-Clazz.defineMethod (c$, "enumerate", \r
- function (h) {\r
-if (this.defaults != null) {\r
-this.defaults.enumerate (h);\r
-}for (var e = this.keys (); e.hasMoreElements (); ) {\r
-var key = e.nextElement ();\r
-h.put (key, this.get (key));\r
-}\r
-}, "java.util.Hashtable");\r
-Clazz.defineMethod (c$, "enumerateStringProperties", \r
- function (h) {\r
-if (this.defaults != null) {\r
-this.defaults.enumerateStringProperties (h);\r
-}for (var e = this.keys (); e.hasMoreElements (); ) {\r
-var k = e.nextElement ();\r
-var v = this.get (k);\r
-if (Clazz.instanceOf (k, String) && Clazz.instanceOf (v, String)) {\r
-h.put (k, v);\r
-}}\r
-}, "java.util.Hashtable");\r
-c$.$Properties$LineReader$ = function () {\r
-Clazz.pu$h(self.c$);\r
-c$ = Clazz.decorateAsClass (function () {\r
-Clazz.prepareCallback (this, arguments);\r
-this.inByteBuf = null;\r
-this.inCharBuf = null;\r
-this.lineBuf = null;\r
-this.inLimit = 0;\r
-this.inOff = 0;\r
-this.inStream = null;\r
-this.reader = null;\r
-Clazz.instantialize (this, arguments);\r
-}, java.util.Properties, "LineReader");\r
-Clazz.prepareFields (c$, function () {\r
-this.lineBuf =  Clazz.newCharArray (1024, '\0');\r
-});\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.inStream = a;\r
-this.inByteBuf =  Clazz.newByteArray (8192, 0);\r
-}, "java.io.InputStream");\r
-Clazz.makeConstructor (c$, \r
-function (a) {\r
-this.reader = a;\r
-this.inCharBuf =  Clazz.newCharArray (8192, '\0');\r
-}, "java.io.Reader");\r
-Clazz.defineMethod (c$, "readLine", \r
-function () {\r
-var a = 0;\r
-var b = String.fromCharCode (0);\r
-var c = true;\r
-var d = false;\r
-var e = true;\r
-var f = false;\r
-var g = false;\r
-var h = false;\r
-while (true) {\r
-if (this.inOff >= this.inLimit) {\r
-this.inLimit = (this.inStream == null) ? this.reader.read (this.inCharBuf) : this.inStream.read (this.inByteBuf);\r
-this.inOff = 0;\r
-if (this.inLimit <= 0) {\r
-if (a == 0 || d) {\r
-return -1;\r
-}return a;\r
-}}if (this.inStream != null) {\r
-b = String.fromCharCode (0xff & this.inByteBuf[this.inOff++]);\r
-} else {\r
-b = this.inCharBuf[this.inOff++];\r
-}if (h) {\r
-h = false;\r
-if (b == '\n') {\r
-continue;\r
-}}if (c) {\r
-if (b == ' ' || b == '\t' || b == '\f') {\r
-continue;\r
-}if (!f && (b == '\r' || b == '\n')) {\r
-continue;\r
-}c = false;\r
-f = false;\r
-}if (e) {\r
-e = false;\r
-if (b == '#' || b == '!') {\r
-d = true;\r
-continue;\r
-}}if (b != '\n' && b != '\r') {\r
-this.lineBuf[a++] = b;\r
-if (a == this.lineBuf.length) {\r
-var i = this.lineBuf.length * 2;\r
-{\r
-}var j =  Clazz.newCharArray (i, '\0');\r
-System.arraycopy (this.lineBuf, 0, j, 0, this.lineBuf.length);\r
-this.lineBuf = j;\r
-}if (b == '\\') {\r
-g = !g;\r
-} else {\r
-g = false;\r
-}} else {\r
-if (d || a == 0) {\r
-d = false;\r
-e = true;\r
-c = true;\r
-a = 0;\r
-continue;\r
-}if (this.inOff >= this.inLimit) {\r
-this.inLimit = (this.inStream == null) ? this.reader.read (this.inCharBuf) : this.inStream.read (this.inByteBuf);\r
-this.inOff = 0;\r
-if (this.inLimit <= 0) {\r
-return a;\r
-}}if (g) {\r
-a -= 1;\r
-c = true;\r
-f = true;\r
-g = false;\r
-if (b == '\r') {\r
-h = true;\r
-}} else {\r
-return a;\r
-}}}\r
-});\r
-c$ = Clazz.p0p ();\r
-};\r
-});\r
+Clazz.declarePackage ("java.util");
+Clazz.load (["java.util.Hashtable"], "java.util.Properties", ["java.lang.IllegalArgumentException"], function () {
+c$ = Clazz.decorateAsClass (function () {
+this.defaults = null;
+if (!Clazz.isClassDefined ("java.util.Properties.LineReader")) {
+java.util.Properties.$Properties$LineReader$ ();
+}
+Clazz.instantialize (this, arguments);
+}, java.util, "Properties", java.util.Hashtable);
+Clazz.makeConstructor (c$, 
+function () {
+this.construct (null);
+});
+Clazz.makeConstructor (c$, 
+function (defaults) {
+Clazz.superConstructor (this, java.util.Properties, []);
+this.defaults = defaults;
+}, "java.util.Properties");
+Clazz.defineMethod (c$, "setProperty", 
+function (key, value) {
+return this.put (key, value);
+}, "~S,~S");
+Clazz.defineMethod (c$, "load", 
+function (reader) {
+this.load0 (Clazz.innerTypeInstance (java.util.Properties.LineReader, this, null, reader));
+}, "java.io.Reader");
+Clazz.defineMethod (c$, "load", 
+function (inStream) {
+this.load0 (Clazz.innerTypeInstance (java.util.Properties.LineReader, this, null, inStream));
+}, "java.io.InputStream");
+Clazz.defineMethod (c$, "load0", 
+ function (lr) {
+var convtBuf =  Clazz.newCharArray (1024, '\0');
+var limit;
+var keyLen;
+var valueStart;
+var c;
+var hasSep;
+var precedingBackslash;
+while ((limit = lr.readLine ()) >= 0) {
+c = String.fromCharCode ( 0);
+keyLen = 0;
+valueStart = limit;
+hasSep = false;
+precedingBackslash = false;
+while (keyLen < limit) {
+c = lr.lineBuf[keyLen];
+if ((c == '=' || c == ':') && !precedingBackslash) {
+valueStart = keyLen + 1;
+hasSep = true;
+break;
+} else if ((c == ' ' || c == '\t' || c == '\f') && !precedingBackslash) {
+valueStart = keyLen + 1;
+break;
+}if (c == '\\') {
+precedingBackslash = !precedingBackslash;
+} else {
+precedingBackslash = false;
+}keyLen++;
+}
+while (valueStart < limit) {
+c = lr.lineBuf[valueStart];
+if (c != ' ' && c != '\t' && c != '\f') {
+if (!hasSep && (c == '=' || c == ':')) {
+hasSep = true;
+} else {
+break;
+}}valueStart++;
+}
+var key = this.loadConvert (lr.lineBuf, 0, keyLen, convtBuf);
+var value = this.loadConvert (lr.lineBuf, valueStart, limit - valueStart, convtBuf);
+this.put (key, value);
+}
+}, "java.util.Properties.LineReader");
+Clazz.defineMethod (c$, "loadConvert", 
+ function ($in, off, len, convtBuf) {
+if (convtBuf.length < len) {
+var newLen = len * 2;
+if (newLen < 0) {
+newLen = 2147483647;
+}convtBuf =  Clazz.newCharArray (newLen, '\0');
+}var aChar;
+var out = convtBuf;
+var outLen = 0;
+var end = off + len;
+while (off < end) {
+aChar = $in[off++];
+if (aChar == '\\') {
+aChar = $in[off++];
+if (aChar == 'u') {
+var value = 0;
+for (var i = 0; i < 4; i++) {
+aChar = $in[off++];
+switch (aChar) {
+case '0':
+case '1':
+case '2':
+case '3':
+case '4':
+case '5':
+case '6':
+case '7':
+case '8':
+case '9':
+value = (value << 4) + aChar.charCodeAt (0) - 48;
+break;
+case 'a':
+case 'b':
+case 'c':
+case 'd':
+case 'e':
+case 'f':
+value = (value << 4) + 10 + aChar.charCodeAt (0) - 97;
+break;
+case 'A':
+case 'B':
+case 'C':
+case 'D':
+case 'E':
+case 'F':
+value = (value << 4) + 10 + aChar.charCodeAt (0) - 65;
+break;
+default:
+throw  new IllegalArgumentException ("Malformed \\uxxxx encoding.");
+}
+}
+out[outLen++] = String.fromCharCode (value);
+} else {
+if (aChar == 't') aChar = '\t';
+ else if (aChar == 'r') aChar = '\r';
+ else if (aChar == 'n') aChar = '\n';
+ else if (aChar == 'f') aChar = '\f';
+out[outLen++] = aChar;
+}} else {
+out[outLen++] = aChar;
+}}
+return  String.instantialize (out, 0, outLen);
+}, "~A,~N,~N,~A");
+Clazz.defineMethod (c$, "getProperty", 
+function (key) {
+var oval = Clazz.superCall (this, java.util.Properties, "get", [key]);
+var sval = (Clazz.instanceOf (oval, String)) ? oval : null;
+return ((sval == null) && (this.defaults != null)) ? this.defaults.getProperty (key) : sval;
+}, "~S");
+Clazz.defineMethod (c$, "getProperty", 
+function (key, defaultValue) {
+var val = this.getProperty (key);
+return (val == null) ? defaultValue : val;
+}, "~S,~S");
+Clazz.defineMethod (c$, "propertyNames", 
+function () {
+var h =  new java.util.Hashtable ();
+this.enumerate (h);
+return h.keys ();
+});
+Clazz.defineMethod (c$, "stringPropertyNames", 
+function () {
+var h =  new java.util.Hashtable ();
+this.enumerateStringProperties (h);
+return h.keySet ();
+});
+Clazz.defineMethod (c$, "enumerate", 
+ function (h) {
+if (this.defaults != null) {
+this.defaults.enumerate (h);
+}for (var e = this.keys (); e.hasMoreElements (); ) {
+var key = e.nextElement ();
+h.put (key, this.get (key));
+}
+}, "java.util.Hashtable");
+Clazz.defineMethod (c$, "enumerateStringProperties", 
+ function (h) {
+if (this.defaults != null) {
+this.defaults.enumerateStringProperties (h);
+}for (var e = this.keys (); e.hasMoreElements (); ) {
+var k = e.nextElement ();
+var v = this.get (k);
+if (Clazz.instanceOf (k, String) && Clazz.instanceOf (v, String)) {
+h.put (k, v);
+}}
+}, "java.util.Hashtable");
+c$.$Properties$LineReader$ = function () {
+Clazz.pu$h(self.c$);
+c$ = Clazz.decorateAsClass (function () {
+Clazz.prepareCallback (this, arguments);
+this.inByteBuf = null;
+this.inCharBuf = null;
+this.lineBuf = null;
+this.inLimit = 0;
+this.inOff = 0;
+this.inStream = null;
+this.reader = null;
+Clazz.instantialize (this, arguments);
+}, java.util.Properties, "LineReader");
+Clazz.prepareFields (c$, function () {
+this.lineBuf =  Clazz.newCharArray (1024, '\0');
+});
+Clazz.makeConstructor (c$, 
+function (a) {
+this.inStream = a;
+this.inByteBuf =  Clazz.newByteArray (8192, 0);
+}, "java.io.InputStream");
+Clazz.makeConstructor (c$, 
+function (a) {
+this.reader = a;
+this.inCharBuf =  Clazz.newCharArray (8192, '\0');
+}, "java.io.Reader");
+Clazz.defineMethod (c$, "readLine", 
+function () {
+var a = 0;
+var b = String.fromCharCode (0);
+var c = true;
+var d = false;
+var e = true;
+var f = false;
+var g = false;
+var h = false;
+while (true) {
+if (this.inOff >= this.inLimit) {
+this.inLimit = (this.inStream == null) ? this.reader.read (this.inCharBuf) : this.inStream.read (this.inByteBuf);
+this.inOff = 0;
+if (this.inLimit <= 0) {
+if (a == 0 || d) {
+return -1;
+}return a;
+}}if (this.inStream != null) {
+b = String.fromCharCode (0xff & this.inByteBuf[this.inOff++]);
+} else {
+b = this.inCharBuf[this.inOff++];
+}if (h) {
+h = false;
+if (b == '\n') {
+continue;
+}}if (c) {
+if (b == ' ' || b == '\t' || b == '\f') {
+continue;
+}if (!f && (b == '\r' || b == '\n')) {
+continue;
+}c = false;
+f = false;
+}if (e) {
+e = false;
+if (b == '#' || b == '!') {
+d = true;
+continue;
+}}if (b != '\n' && b != '\r') {
+this.lineBuf[a++] = b;
+if (a == this.lineBuf.length) {
+var i = this.lineBuf.length * 2;
+{
+}var j =  Clazz.newCharArray (i, '\0');
+System.arraycopy (this.lineBuf, 0, j, 0, this.lineBuf.length);
+this.lineBuf = j;
+}if (b == '\\') {
+g = !g;
+} else {
+g = false;
+}} else {
+if (d || a == 0) {
+d = false;
+e = true;
+c = true;
+a = 0;
+continue;
+}if (this.inOff >= this.inLimit) {
+this.inLimit = (this.inStream == null) ? this.reader.read (this.inCharBuf) : this.inStream.read (this.inByteBuf);
+this.inOff = 0;
+if (this.inLimit <= 0) {
+return a;
+}}if (g) {
+a -= 1;
+c = true;
+f = true;
+g = false;
+if (b == '\r') {
+h = true;
+}} else {
+return a;
+}}}
+});
+c$ = Clazz.p0p ();
+};
+});