private void updateUnderFileSystemInputStream ( long offset ) throws IOException { if ( ( mUnderFileSystemInputStream != null ) && offset != mInStreamPos ) { mUfsInstreamManager . release ( mUnderFileSystemInputStream ) ; mUnderFileSystemInputStream = null ; mInStreamPos = - 1 ; } if ( mUnderFileSystemInputStream == null && offset < mBlockMeta . getBlockSize ( ) ) { UnderFileSystem ufs = mUfsResource . get ( ) ; mUnderFileSystemInputStream = mUfsInstreamManager . acquire ( ufs , mBlockMeta . getUnderFileSystemPath ( ) , IdUtils . fileIdFromBlockId ( mBlockMeta . getBlockId ( ) ) , OpenOptions . defaults ( ) . setOffset ( mBlockMeta . getOffset ( ) + offset ) ) ; mInStreamPos = offset ; } }
Updates the UFS input stream given an offset to read .