Package htsjdk.samtools.cram.build
Class CramContainerHeaderIterator
- java.lang.Object
-
- htsjdk.samtools.cram.build.CramContainerIterator
-
- htsjdk.samtools.cram.build.CramContainerHeaderIterator
-
public class CramContainerHeaderIterator extends CramContainerIterator
Iterate over CRAM containers from an input stream, and unlikeCramContainerIterator
only the header of each container is read, rather than the whole stream. As a result, the container block data is *not* populated, including the compression header block and slices. This class is useful when you are not interested in the contents of containers, for example when indexing container start positions.
-
-
Constructor Summary
Constructors Constructor Description CramContainerHeaderIterator(InputStream inputStream)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected Container
containerFromStream(Version cramVersion, CountingInputStream countingStream)
Consume the entirety of the next container from the stream.-
Methods inherited from class htsjdk.samtools.cram.build.CramContainerIterator
close, getCramHeader, hasNext, next, remove
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface java.util.Iterator
forEachRemaining
-
-
-
-
Constructor Detail
-
CramContainerHeaderIterator
public CramContainerHeaderIterator(InputStream inputStream) throws IOException
- Throws:
IOException
-
-
Method Detail
-
containerFromStream
protected Container containerFromStream(Version cramVersion, CountingInputStream countingStream) throws IOException
Description copied from class:CramContainerIterator
Consume the entirety of the next container from the stream.- Overrides:
containerFromStream
in classCramContainerIterator
- Returns:
- The next Container from the stream.
- Throws:
IOException
-
-