public void close(){
  Thread current=thread;
  thread=null;
  if (current != null) {
    current.interrupt();
    try {
      current.join();
    }
 catch (    InterruptedException e) {
      log.error(e.getMessage(),e);
    }
  }
  try {
    buffer.close();
  }
 catch (  IOException e) {
    log.error(e.getMessage(),e);
  }
}

public void close ( ) { Thread current = thread ; thread = null ; if ( current != null ) { current . interrupt ( ) ; try { current . join ( ) ; } catch ( InterruptedException e ) { log . error ( e . getMessage ( ) , e ) ; } } try { buffer . close ( ) ; } catch ( IOException e ) { log . error ( e . getMessage ( ) , e ) ; } }
stops the monitor and closes the buffer . this should only be called if the contents of the buffer are no longer required .
