The J2SE documentation specifies: The set of all legal URI characters consists of the unreserved, reserved, escaped, and other characters. @param ch @return @see http://docs.oracle.com/javase/6/docs/api/java/net/URI.html
(int ch)
| 595 | * @see <a href="http://docs.oracle.com/javase/6/docs/api/java/net/URI.html">http://docs.oracle.com/javase/6/docs/api/java/net/URI.html</a> |
| 596 | */ |
| 597 | static boolean isLegal(int ch) { |
| 598 | return isAlpha(ch) || isNumeric(ch) || URI.UNRESERVED_EXTRAS.indexOf(ch) != -1 |
| 599 | || URI.RESERVED.indexOf(ch) != -1 || isLegalUnicode(ch); |
| 600 | } |
| 601 | |
| 602 | static boolean isLegalUnicode(int ch) { |
| 603 | return isASCII(ch) == false && isSpace(ch) == false && isISOControl(ch) == false; |
no test coverage detected