String[] split(String line, String delim) {
    StringTokenizer tok = new StringTokenizer(line, delim);
    String[] ret = new String[tok.countTokens()];
    int index = 0;
    while (tok.hasMoreTokens()) {
      String t = tok.nextToken();
      t = dequote(t);
      ret[index++] = t;
    }
    return ret;
  }
Split the line into an array by tokenizing on space characters

@param line
         the line to break up
@return an array of individual words
beeline/src/java/org/apache/hive/beeline/BeeLine.java