@Override
  public void close() throws IOException {
    if (mClosed) {
      return;
    }

    try {
      // This aborts the block if the block is not fully read.
      updateBlockWriter(mBlockMeta.getBlockSize());

      if (mUnderFileSystemInputStream != null) {
        mUfsInstreamManager.release(mUnderFileSystemInputStream);
        mUnderFileSystemInputStream = null;
      }

      if (mBlockWriter != null) {
        mBlockWriter.close();
      }

      mUfsResource.close();
    } finally {
      mClosed = true;
    }
  }
@ Override public void close ( ) throws IOException { if ( mClosed ) { return ; } try { updateBlockWriter ( mBlockMeta . getBlockSize ( ) ) ; if ( mUnderFileSystemInputStream != null ) { mUfsInstreamManager . release ( mUnderFileSystemInputStream ) ; mUnderFileSystemInputStream = null ; } if ( mBlockWriter != null ) { mBlockWriter . close ( ) ; } mUfsResource . close ( ) ; } finally { mClosed = true ; } }
Closes the block reader. After this, this block reader should not be used anymore.
This is recommended to be called after the client finishes reading the block. It is usually
triggered when the client unlocks the block.