public static URI[] stringToURI(String[] str){
    if (str == null) {
      return null;
    }
    URI[] uris = new URI[str.length];
    for (int i = 0; i < str.length;i++){
      try{
        uris[i] = new URI(str[i]);
      }catch(URISyntaxException ur){
        throw new IllegalArgumentException(
            "Failed to create uri for " + str[i], ur);
      }
    }
    return uris;
  }
@param str
         The string array to be parsed into an URI array.
@return <pre>null</pre> if str is <pre>null</pre>, else the URI array
        equivalent to str.
@throws IllegalArgumentException
          If any string in str violates RFC&nbsp;2396.
common/src/java/org/apache/hive/common/util/HiveStringUtils.java