/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }
if (!isAlphanum(address.charAt(i - 1))) if (i + 1 < addrLength &&!isAlphanum(address.charAt(i + 1))) else if (!isAlphanum(testChar) && testChar != '-')
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a char is an unreserved character. * * * @param p_char the character to check * @return true if the char is unreserved, false otherwise */ private static boolean isUnreservedCharacter(char p_char) { return (isAlphanum(p_char) || MARK_CHARACTERS.indexOf(p_char) != -1); }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }
/** * Determine whether a scheme conforms to the rules for a scheme name. * A scheme is conformant if it starts with an alphanumeric, and * contains only alphanumerics, '+','-' and '.'. * * * @param p_scheme The sheme name to check * @return true if the scheme is conformant, false otherwise */ public static boolean isConformantSchemeName(String p_scheme) { if (p_scheme == null || p_scheme.trim().length() == 0) { return false; } if (!isAlpha(p_scheme.charAt(0))) { return false; } char testChar; for (int i = 1; i < p_scheme.length(); i++) { testChar = p_scheme.charAt(i); if (!isAlphanum(testChar) && SCHEME_CHARACTERS.indexOf(testChar) == -1) { return false; } } return true; }