@SuppressWarnings("deprecation") @Override public void run(){
  try {
    String line;
    while ((line=in.readLine()) != null) {
      out.println(line);
    }
  }
 catch (  IOException e) {
  }
synchronized (this) {
    done=true;
    notifyAll();
  }
}

@ SuppressWarnings ( "deprecation" ) @ Override public void run ( ) { try { String line ; while ( ( line = in . readLine ( ) ) != null ) { out . println ( line ) ; } } catch ( IOException e ) { } synchronized ( this ) { done = true ; notifyAll ( ) ; } }
set the thread going .
