* @return
* @throws IOException
*/
public IndexBlock getIndexBlock(IndexRoot indexRoot, long vcn) throws IOException {
log.debug("getIndexBlock(..," + vcn + ")");
final FileRecord fileRecord = getFileRecord();
// VCN passed in is relative to the size of index clusters, not filesystem clusters.
// Calculate the actual offset we need in terms of filesystem clusters,
// and how many actual clusters we will need to read.
final int indexBlockSize = indexRoot.getIndexBlockSize();
final int indexClusterSize = indexBlockSize / indexRoot.getClustersPerIndexBlock();
final int fsClusterSize = fileRecord.getVolume().getClusterSize();
final long fsVcn = vcn * indexClusterSize / fsClusterSize;
final int fsNrClusters = (indexBlockSize - 1) / fsClusterSize + 1;
final int offsetIntoVcn = (int) ((vcn * indexClusterSize) % fsClusterSize);
final byte[] data = new byte[fsNrClusters * fsClusterSize];