T - the type of the index (e.g. AbstractBAMFileIndex for a BAM index).public abstract class IndexMerger<T>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
protected java.io.OutputStream |
out |
protected java.util.List<java.lang.Long> |
partLengths |
| Constructor and Description |
|---|
IndexMerger(java.io.OutputStream out,
long headerLength)
Create an index merger.
|
| Modifier and Type | Method and Description |
|---|---|
abstract void |
finish(long dataFileLength)
Finish merging the indexes, and close the output stream.
|
abstract void |
processIndex(T index,
long partLength)
Process the next index and add to the merged index.
|
protected final java.io.OutputStream out
protected final java.util.List<java.lang.Long> partLengths
public IndexMerger(java.io.OutputStream out,
long headerLength)
out - the output stream to write the merged index to. Must be uncompressed since the implementation of this
class will provide appropriate compression.headerLength - the length of the header file, in bytes.public abstract void processIndex(T index, long partLength)
index - the index to mergepartLength - the length of the part file corresponding to the index, in bytes.public abstract void finish(long dataFileLength)
throws java.io.IOException
dataFileLength - the length of the total data file, in bytes.java.io.IOException - if an error occurs