public static String[] fromList(String urlList) throws NamingException {
  String[] urls=new String[(urlList.length() + 1) / 2];
  int i=0;
  StringTokenizer st=new StringTokenizer(urlList," ");
  while (st.hasMoreTokens()) {
    urls[i++]=st.nextToken();
  }
  String[] trimmed=new String[i];
  System.arraycopy(urls,0,trimmed,0,i);
  return trimmed;
}

public static String [ ] fromList ( String urlList ) throws NamingException { String [ ] urls = new String [ ( urlList . length ( ) + 1 ) / 2 ] ; int i = 0 ; StringTokenizer st = new StringTokenizer ( urlList , " " ) ; while ( st . hasMoreTokens ( ) ) { urls [ i ++ ] = st . nextToken ( ) ; } String [ ] trimmed = new String [ i ] ; System . arraycopy ( urls , 0 , trimmed , 0 , i ) ; return trimmed ; }
given a space - separated list of ldap urls , returns an array of strings .
