private static boolean isURIString(String p_uric){
  if (p_uric == null) {
    return false;
  }
  int end=p_uric.length();
  char testChar='\0';
  for (int i=0; i < end; i++) {
    testChar=p_uric.charAt(i);
    if (testChar == '%') {
      if (i + 2 >= end || !isHex(p_uric.charAt(i + 1)) || !isHex(p_uric.charAt(i + 2))) {
        return false;
      }
 else {
        i+=2;
        continue;
      }
    }
    if (isURICharacter(testChar)) {
      continue;
    }
 else {
      return false;
    }
  }
  return true;
}

private static boolean isURIString ( String p_uric ) { if ( p_uric == null ) { return false ; } int end = p_uric . length ( ) ; char testChar = '\0' ; for ( int i = 0 ; i < end ; i ++ ) { testChar = p_uric . charAt ( i ) ; if ( testChar == '%' ) { if ( i + 2 >= end || ! isHex ( p_uric . charAt ( i + 1 ) ) || ! isHex ( p_uric . charAt ( i + 2 ) ) ) { return false ; } else { i += 2 ; continue ; } } if ( isURICharacter ( testChar ) ) { continue ; } else { return false ; } } return true ; }
determine whether a given string contains only uri characters ( also called " uric " in rfc 2396 ) . uric consist of all reserved characters , unreserved characters and escaped characters .
