@Override public void close() throws IOException {
synchronized (lock) {
    if (!isClosed()) {
      in.close();
      buf=null;
    }
  }
}

@ Override public void close ( ) throws IOException { synchronized ( lock ) { if ( ! isClosed ( ) ) { in . close ( ) ; buf = null ; } } }
closes this reader . this implementation closes the buffered source reader and releases the buffer . nothing is done if this reader has already been closed .
