public static String[] stringArrayFromProperties(Properties p,String propName,String tok){
  String[] ret=null;
  String raw=p.getProperty(propName);
  if (raw != null && raw.length() > 0) {
    try {
      StringTokenizer token=new StringTokenizer(raw,tok);
      int numPaths=token.countTokens();
      ret=new String[numPaths];
      for (int i=0; i < numPaths; i++) {
        ret[i]=token.nextToken();
      }
      return ret;
    }
 catch (    java.util.NoSuchElementException e) {
      e.printStackTrace();
    }
  }
  return ret;
}

public static String [ ] stringArrayFromProperties ( Properties p , String propName , String tok ) { String [ ] ret = null ; String raw = p . getProperty ( propName ) ; if ( raw != null && raw . length ( ) > 0 ) { try { StringTokenizer token = new StringTokenizer ( raw , tok ) ; int numPaths = token . countTokens ( ) ; ret = new String [ numPaths ] ; for ( int i = 0 ; i < numPaths ; i ++ ) { ret [ i ] = token . nextToken ( ) ; } return ret ; } catch ( java . util . NoSuchElementException e ) { e . printStackTrace ( ) ; } } return ret ; }
takes a string of representing token separated properties and returns an array of parsed strings . note : this method currently doesn ' t support appropriate quoting of the token , although it probably should . . .
