Starts execution of the program, requiring a host name and port number as an argument. @param args @throws Exception
(String[] args)
| 79 | * @throws Exception |
| 80 | */ |
| 81 | public static void main(String[] args) throws Exception { |
| 82 | if (args[0] != null && args[1] != null) { |
| 83 | start(args[0], Integer.parseInt(args[1])); |
| 84 | } else { |
| 85 | System.out.println("usage:\ndownload: java main.java.nc.NetcatClient [host] [port] > [downloaded-file]\nupload: java main.java.nc.NetcatClient [host] [port] > [original-file]"); |
| 86 | } |
| 87 | } |
| 88 | } |