34 public static void main( String[] args )
39 final int DEFALUT_PORT_NO = 40801 ;
40 int portNo = DEFALUT_PORT_NO ;
43 if( args.length != 2 )
45 System.out.println(
"Usage: java g4mini src_file server_hostname");
49 String server = args[1];
52 Socket socket =
new Socket( server, portNo ) ;
56 =
new BufferedReader (
new FileReader ( src ) ) ;
60 =
new BufferedWriter (
new OutputStreamWriter ( socket.getOutputStream() ) ) ;
64 while ( (line = br.readLine()) != null )
79 System.out.println( e.toString() );
static void main(String[] args)
void Exception(const char *originOfException, const char *exceptionCode, ExceptionSeverity severity, int level, const char *description)