private Memory readChunkOffsets ( DataInput input ) { try { int chunkCount = input . readInt ( ) ; Memory offsets = Memory . allocate ( chunkCount * 8 ) ; for ( int i = 0 ; i < chunkCount ; i ++ ) { try { offsets . setLong ( i * 8 , input . readLong ( ) ) ; } catch ( EOFException e ) { String msg = String . format ( "Corrupted Index File %s: read %d but expected %d chunks." , indexFilePath , i , chunkCount ) ; throw new CorruptSSTableException ( new IOException ( msg , e ) , indexFilePath ) ; } } return offsets ; } catch ( IOException e ) { throw new FSReadError ( e , indexFilePath ) ; } }
Read offsets of the individual chunks from the given input .