private static HashMap parseCommandLine(String args[])
    {
        HashMap hash = new HashMap();
        for (int i=0; i < args.length; i++) {
          String arg = args[i];
            
          if(args[i].startsWith("-"))
          {
            if(arg.equals("-port"))
              hash.put("PORT", Integer.parseInt(args[++i]));
            else if(arg.equals("-buf"))
              hash.put("BUFFER", Integer.parseInt(args[++i]));
            else if(arg.equals("-max_seg"))
              hash.put("MAXSEG", Integer.parseInt(args[++i]));
            else if(arg.equals("-min_seg"))
              hash.put("MINSEG", Integer.parseInt(args[++i]));
            else if(arg.equals("-threads"))
              hash.put("THREADS", Integer.parseInt(args[++i]));
            else if(arg.equals("-outdir"))
              hash.put("OUTDIR", args[++i]);
            else {
              System.err.print("Unknown argument: " + arg);
            }
          }
        }
        return hash;
    }