Replaced a useless getInt with a skipInt to remove 1/4 of the initial seek time in the BAM Index.

This commit is contained in:
Yossi Farjoun 2012-12-12 15:26:38 -05:00
parent 62eaffdf0a
commit 5e66109268
1 changed files with 5 additions and 1 deletions

View File

@ -282,7 +282,7 @@ public class GATKBAMIndex {
final int nBins = readInteger();
// System.out.println("# nBins: " + nBins);
for (int j = 0; j < nBins; j++) {
final int bin = readInteger();
skipInteger();
final int nChunks = readInteger();
// System.out.println("# bin[" + j + "] = " + bin + ", nChunks = " + nChunks);
skipBytes(16 * nChunks);
@ -334,6 +334,10 @@ public class GATKBAMIndex {
return buffer.getInt();
}
private void skipInteger() {
skipBytes(INT_SIZE_IN_BYTES);
}
/**
* Reads an array of <count> longs from the file channel, returning the results as an array.
* @param count Number of longs to read.