Vector record = new Vector(); String[] ret = new String[0]; Token tkn; while ((tkn = nextToken()).type == TT_TOKEN) { record.add(tkn.content.toString());
String[] ret = EMPTY_STRING_ARRAY; record.clear(); while (true) { reusableToken.reset(); nextToken(reusableToken); switch (reusableToken.type) { case TT_TOKEN: record.add(reusableToken.content.toString()); break; case TT_EORECORD: record.add(reusableToken.content.toString()); break; case TT_EOF: if (reusableToken.isReady) { record.add(reusableToken.content.toString()); } else { ret = null; } break; case TT_INVALID: default:  throw new IOException("(line " + getLineNumber() + ") invalid parse sequence");  } if (reusableToken.type != TT_TOKEN) break;
  public String[] getLine() throws IOException {    Vector record = new Vector();    String[] ret = new String[0];    Token tkn;    while ((tkn = nextToken()).type == TT_TOKEN) {      record.add(tkn.content.toString());      }    // did we reached eorecord or eof ?    switch (tkn.type) {      case TT_EORECORD:        record.add(tkn.content.toString());        break;      case TT_EOF:        if (tkn.isReady) {          record.add(tkn.content.toString());        } else {          ret = null;        }        break;      case TT_INVALID:      default:        // error: throw IOException        throw new IOException(          "(line " + getLineNumber()           + ") invalid parse sequence");        // unreachable: break;    }    if (record.size() > 0) {      ret = new String[record.size()];      record.toArray(ret);    }    return ret;  }