jmdns.registerService(new ServiceInfo(type, name, InetAddress.getLocalHost(), Integer.parseInt(argv[4]), 0, 0, argv[5]));
jmdns.registerService(new ServiceInfo(type, name, Integer.parseInt(argv[4]), 0, 0, argv[5]));
    public static void main(String argv[]) throws IOException    {	int argc = argv.length;	boolean debug = false;	if ((argc > 0) && "-d".equals(argv[0])) {	    System.arraycopy(argv, 1, argv, 0, --argc);	    System.getProperties().put("jmdns.debug", "1");	    debug = true;	}		JmDNS jmdns = new JmDNS();	if ((argc == 0) || ((argc >= 1) && "-browse".equals(argv[0]))) {	    if (argc > 1) {		String types[] = new String[argc - 1];		System.arraycopy(argv, 1, types, 0, argc - 1);		new Browser(jmdns, types);	    } else {		new Browser(jmdns);	    }	} else if ((argc == 3) && "-bs".equals(argv[0])) {	    jmdns.addServiceListener(argv[1] + "." + argv[2], new SampleListener());	} else if ((argc == 6) && "-rs".equals(argv[0])) {	    String type = argv[2] + "." + argv[3];	    String name = argv[1] + "." + type;	    jmdns.registerService(new ServiceInfo(type, name, InetAddress.getLocalHost(), Integer.parseInt(argv[4]), 0, 0, argv[5]));	} else if (!debug) {	    System.out.println();	    System.out.println("jmdns:");	    System.out.println("     -d                                       - output debugging info");	    System.out.println("     -browse [<type>...]                      - GUI browser (default)");	    System.out.println("     -bs <type> <domain>                      - browse service");	    System.out.println("     -rs <name> <type> <domain> <port> <txt>  - register service");	    System.out.println();	    System.exit(1);	}    }