private void locateBlockByPos ( BlockInfo info , long pos ) { if ( pos < 0 || pos >= uncompressedSize ) throw new IndexOutOfBoundsException ( "Invalid uncompressed position: " + pos ) ; // Locate the Stream that contains the target position. IndexDecoder index ; for ( int i = 0 ; ; ++ i ) { index = streams . get ( i ) ; if ( index . hasUncompressedOffset ( pos ) ) break ; } // Locate the Block from the Stream that contains the target position. index . locateBlock ( info , pos ) ; assert ( info . compressedOffset & 3 ) == 0 ; assert info . uncompressedSize > 0 ; assert pos >= info . uncompressedOffset ; assert pos < info . uncompressedOffset + info . uncompressedSize ; }
Locates the Block that contains the given uncompressed position .