code: public static String[] toStringArray(Enumeration<String> enumeration) {
          if (enumeration == null) {
              return null;
          }
          List<String> list = java.util.Collections.list(enumeration);
          return list.toArray(new String[list.size()]);
      }
docs: Copy the given Enumeration into a String array.
  The Enumeration must contain String elements only.
  @param enumeration the Enumeration to copy
  @return the String array (<code>null</code> if the passed-in
  Enumeration was <code>null</code>)