コード例 #1
0
 public void run() {
   while (true) {
     try {
       client.handle(streamIn.readUTF());
     } catch (IOException ioe) {
       System.out.println("Server disconnected. Come back latter.");
       client.stop();
     }
   }
 }
コード例 #2
0
 public void open() {
   try {
     streamIn = new DataInputStream(socket.getInputStream());
   } catch (IOException ioe) {
     System.out.println("Error getting input stream: " + ioe);
     client.stop();
   }
 }