public static void urlOptionsToProperties(String urlOptions,Properties p) throws SQLException {
  String key;
  StringTokenizer st=new StringTokenizer(urlOptions,URL_OPTIONS_DELIMITERS);
  while (st.hasMoreTokens()) {
    key=st.nextToken();
    if (!st.hasMoreTokens()) {
      throw new SQLException("Invalid empty value for property '" + key + "' in URL: "+ urlOptions);
    }
    String value=st.nextToken();
    p.setProperty(key,value);
  }
}

public static void urlOptionsToProperties ( String urlOptions , Properties p ) throws SQLException { String key ; StringTokenizer st = new StringTokenizer ( urlOptions , URL_OPTIONS_DELIMITERS ) ; while ( st . hasMoreTokens ( ) ) { key = st . nextToken ( ) ; if ( ! st . hasMoreTokens ( ) ) { throw new SQLException ( "Invalid empty value for property '" + key + "' in URL: " + urlOptions ) ; } String value = st . nextToken ( ) ; p . setProperty ( key , value ) ; } }
given a string of url options ( eg . affinity = blah & maxappliedlatency = 2 ) , extracts each option and add them to the given properties parameter .
