public void printUsage(OutputStream out) {
		PrintStream p = new PrintStream(out);
		p.print("Usage: " + name);
		if (!options.isEmpty()) {
			p.print(" [-options]");
		}
		if (!parameters.isEmpty()) {
			Iterator<Parameter> i1 = parameters.iterator();
			while (i1.hasNext()) {
				Parameter param = (i1.next());
				p.print(" ");
				p.print(param.getName());
			}
			p.println();
			p.println();
			p.println("parameters:");
			Iterator<Parameter> i2 = parameters.iterator();
			int w = 0;
			while (i2.hasNext()) {
				Parameter param = (i2.next());
				w = Math.max(w, param.getName().length());
			}
			Iterator<Parameter> i3 = parameters.iterator();
			while (i3.hasNext()) {
				Parameter param = (i3.next());
				p.print("  ");
				p.print(pad(param.getName(), w));
				p.print("   ");
				p.println(param.getUsage());
			}
		} else {
			p.println();
		}

		if (!options.isEmpty()) {
			p.println();
			p.println("options:");

			Iterator<Option> i1 = options.iterator();
			int w = 0;
			while (i1.hasNext()) {
				Option opt = (i1.next());
				w = Math.max(w, opt.getOption().length());
			}
			Iterator<Option> i2 = options.iterator();
			while (i2.hasNext()) {
				Option opt = (i2.next());
				p.print("  ");
				p.print(pad(opt.getOption(), w));
				p.print("   ");
				p.println(opt.getUsage());
			}
		}
	}