| | | 1 | if (testChar == '#') {↵
|
1 | index++;↵ | | 2 | index++;↵
|
2 | start = index;↵ | | 3 | start = index;↵
|
3 | while (index < end) {↵ | | 4 | while (index < end) {↵
|
4 | testChar = p_uriSpec.charAt(index);↵ | | 5 | testChar = p_uriSpec.charAt(index);↵
|
5 | if (testChar == '#') {↵ | | |
|
6 | break;↵ | | |
|
7 | }↵ | | |
|
8 | if (testChar == '%') {↵ | | 6 | if (testChar == '%') {↵
|
9 | if (index+2 >= end ||↵ | | 7 | if (index+2 >= end ||↵
|
10 | !isHex(p_uriSpec.charAt(index+1)) ||↵ | | 8 | !isHex(p_uriSpec.charAt(index+1)) ||↵
|
11 | !isHex(p_uriSpec.charAt(index+2))) {↵ | | 9 | !isHex(p_uriSpec.charAt(index+2))) {↵
|
12 | throw new MalformedURIException(↵ | | 10 | throw new MalformedURIException(↵
|
13 | "Query string contains invalid escape sequence!");↵ | | 11 | "Fragment contains invalid escape sequence!");↵
|
14 | }↵ | | 12 | }↵
|
15 | index += 2;↵ | | 13 | index += 2;↵
|
16 | }↵ | | 14 | }↵
|
17 | else if (!isURICharacter(testChar)) {↵ | | 15 | else if (!isURICharacter(testChar)) {↵
|
18 | throw new MalformedURIException(↵ | | 16 | throw new MalformedURIException(↵
|
19 | "Query string contains invalid character: " + testChar);↵ | | 17 | "Fragment contains invalid character: "+testChar);↵
|
20 | }↵ | | 18 | }↵
|
21 | index++;↵ | | 19 | index++;↵
|
22 | }↵ | | 20 | }↵
|
23 | m_queryString = p_uriSpec.substring(start, index);↵ | | 21 | m_fragment = p_uriSpec.substring(start, index);↵
|
24 | | | 22 | }
|