private void run(){
  try {
    Thread current=Thread.currentThread();
    byte[] buf=new byte[1024];
    for (int len=in.read(buf); len != -1; len=in.read(buf)) {
      buffer.write(buf,0,len);
      if (current != thread) {
        break;
      }
    }
    buffer.flush();
    buffer.close();
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
}

private void run ( ) { try { Thread current = Thread . currentThread ( ) ; byte [ ] buf = new byte [ 1024 ] ; for ( int len = in . read ( buf ) ; len != - 1 ; len = in . read ( buf ) ) { buffer . write ( buf , 0 , len ) ; if ( current != thread ) { break ; } } buffer . flush ( ) ; buffer . close ( ) ; } catch ( IOException e ) { log . error ( e . getMessage ( ) , e ) ; } }
consumes the input stream until it runs out or is interrupted .
