public static void main(String[] args) { CommandLineTokenizer clt = new CommandLineTokenizer(); String[] test = { " ", "hash 1024k", "GEt blarf.txt warf.txt", "put \"wo of\" \"blar g\"" }; Vector v; try { for (int i = 0; i < test.length; i++) { v = clt.tokenize(test[i]); System.out.println("elements for argument " + i); for (int j = 0; j < v.size(); j++) { System.out.println(" " + v.elementAt(j)); } System.out.println("-------------------"); } } catch (Exception e) { e.printStackTrace(); } } // end main (for debugging) Vector tokenize(String cl) throws MalformedCommandException {
Vector cmdV = CLT.tokenize(cmdLine); if (cmdV.size() > 0) { String cmdS = ((String) cmdV.elementAt(0));