if (chLocal == quote) {
break;
}
if (chLocal == EOI) {
throw new JSONException("unclosed.str");
}
if (chLocal == '\\') {
if (!hasSpecial) {
hasSpecial = true;
if (sp >= sbuf.length) {
int newCapcity = sbuf.length * 2;
if (sp > newCapcity) {
newCapcity = sp;
}
char[] newsbuf = new char[newCapcity];
System.arraycopy(sbuf, 0, newsbuf, 0, sbuf.length);
sbuf = newsbuf;
}
// text.getChars(np + 1, np + 1 + sp, sbuf, 0);
// System.arraycopy(this.buf, np + 1, sbuf, 0, sp);
arrayCopy(np + 1, sbuf, 0, sp);
}
chLocal = charAt(++bp);
switch (chLocal) {
case '0':
hash = 31 * hash + (int) chLocal;
putChar('\0');
break;
case '1':
hash = 31 * hash + (int) chLocal;
putChar('\1');
break;
case '2':
hash = 31 * hash + (int) chLocal;
putChar('\2');
break;
case '3':
hash = 31 * hash + (int) chLocal;
putChar('\3');
break;
case '4':
hash = 31 * hash + (int) chLocal;
putChar('\4');
break;
case '5':
hash = 31 * hash + (int) chLocal;
putChar('\5');
break;
case '6':
hash = 31 * hash + (int) chLocal;
putChar('\6');
break;
case '7':
hash = 31 * hash + (int) chLocal;
putChar('\7');
break;
case 'b': // 8
hash = 31 * hash + (int) '\b';
putChar('\b');
break;
case 't': // 9
hash = 31 * hash + (int) '\t';
putChar('\t');
break;
case 'n': // 10
hash = 31 * hash + (int) '\n';
putChar('\n');
break;
case 'v': // 11
hash = 31 * hash + (int) '\u000B';
putChar('\u000B');
break;
case 'f': // 12
case 'F':
hash = 31 * hash + (int) '\f';
putChar('\f');
break;
case 'r': // 13
hash = 31 * hash + (int) '\r';
putChar('\r');
break;
case '"': // 34
hash = 31 * hash + (int) '"';
putChar('"');
break;
case '\'': // 39
hash = 31 * hash + (int) '\'';
putChar('\'');
break;
case '/': // 47
hash = 31 * hash + (int) '/';
putChar('/');
break;
case '\\': // 92
hash = 31 * hash + (int) '\\';
putChar('\\');
break;
case 'x':
char x1 = ch = charAt(++bp);
char x2 = ch = charAt(++bp);
int x_val = digits[x1] * 16 + digits[x2];
char x_char = (char) x_val;
hash = 31 * hash + (int) x_char;
putChar(x_char);
break;
case 'u':
char c1 = chLocal = charAt(++bp);
char c2 = chLocal = charAt(++bp);
char c3 = chLocal = charAt(++bp);
char c4 = chLocal = charAt(++bp);
int val = Integer.parseInt(new String(new char[] { c1, c2, c3, c4 }), 16);
hash = 31 * hash + val;
putChar((char) val);
break;
default:
this.ch = chLocal;
throw new JSONException("unclosed.str.lit");
}
continue;
}
hash = 31 * hash + chLocal;