MCPcopy Create free account
hub / github.com/codenameone/CodenameOne / isLegal

Method isLegal

vm/JavaAPI/src/java/net/URIHelper.java:597–600  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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;

Callers 2

encodeStringMethod · 0.95
firstIllegalCharacterMethod · 0.95

Calls 4

isAlphaMethod · 0.95
isNumericMethod · 0.95
isLegalUnicodeMethod · 0.95
indexOfMethod · 0.65

Tested by

no test coverage detected