public static String[] toStringArray(Enumeration<String> enumeration){
  if (enumeration == null) {
    return null;
  }
  List<String> list=Collections.list(enumeration);
  return list.toArray(new String[list.size()]);
}

public static String [ ] toStringArray ( Enumeration < String > enumeration ) { if ( enumeration == null ) { return null ; } List < String > list = Collections . list ( enumeration ) ; return list . toArray ( new String [ list . size ( ) ] ) ; }
copy the given enumeration into a string array . the enumeration must contain string elements only .
