Package htsjdk.samtools
Class SBIIndexMerger
- java.lang.Object
-
- htsjdk.samtools.IndexMerger<SBIIndex>
-
- htsjdk.samtools.SBIIndexMerger
-
public final class SBIIndexMerger extends IndexMerger<SBIIndex>
Merges SBI files for parts of a file that have been concatenated.
-
-
Field Summary
-
Fields inherited from class htsjdk.samtools.IndexMerger
out, partLengths
-
-
Constructor Summary
Constructors Constructor Description SBIIndexMerger(OutputStream out, long headerLength)
Prepare to merge SBI indexes.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
finish(long dataFileLength)
Complete the index, and close the output stream.void
processIndex(SBIIndex index, long partLength)
Add an index for a part of the data file to the merged index.
-
-
-
Constructor Detail
-
SBIIndexMerger
public SBIIndexMerger(OutputStream out, long headerLength)
Prepare to merge SBI indexes.- Parameters:
out
- the stream to write the merged index toheaderLength
- the length of any header that precedes the first part of the data file with an index
-
-
Method Detail
-
processIndex
public void processIndex(SBIIndex index, long partLength)
Add an index for a part of the data file to the merged index. This method should be called for each index for the data file parts, in order.- Specified by:
processIndex
in classIndexMerger<SBIIndex>
- Parameters:
index
- the index to mergepartLength
- the length of the part file corresponding to the index, in bytes.
-
finish
public void finish(long dataFileLength)
Complete the index, and close the output stream.- Specified by:
finish
in classIndexMerger<SBIIndex>
- Parameters:
dataFileLength
- the length of the total data file, in bytes.
-
-