code: public static String[] tokenize(String s) {
      List<String> tokens = new ArrayList<String>();
      StringTokenizer toker = new StringTokenizer(s);
      while (toker.hasMoreTokens())
        tokens.add(toker.nextToken());
      return tokens.toArray(new String[tokens.size()]);
    }
docs: Splits string into an array using StringTokenizer's default delimeter set which is *
  <code>"&nbsp;&#92;t&#92;n&#92;r&#92;f"</code>: the space character, the tab character, the
  newline character, the carriage-return character, and the form-feed character.
  
  @see java.util.StringTokenizer