code: public String[] tokenize(String string, String token) {
          String[] result;
          try {
              StringTokenizer st = new StringTokenizer(string, token);
              List<String> list = new ArrayList<String>();
              while (st.hasMoreTokens()) {
                  list.add(st.nextToken());
              }
              result = list.toArray(new String[list.size()]);
          } catch (Exception e) {
              result = null;
          }
          return result;
      }
docs: Tokenize the given string with the given token. This will return an array
  of strings containing each token delimited by the given value.
  
  @param string The string to tokenize
  @param token The token delimiter to delimit on
  
  @return The array of tokens based on the delimiter
  
  @see StringTokenizer