public void done(){
  if (read != null) {
    try {
      read.close();
    }
 catch (    IOException e) {
    }
    read=null;
  }
  if (write != null) {
    try {
      data=write.toByteArray();
      write.close();
    }
 catch (    IOException e) {
    }
    write=null;
  }
}

public void done ( ) { if ( read != null ) { try { read . close ( ) ; } catch ( IOException e ) { } read = null ; } if ( write != null ) { try { data = write . toByteArray ( ) ; write . close ( ) ; } catch ( IOException e ) { } write = null ; } }
deallocate resources and in the case of a writable log record write data .
