Package htsjdk.samtools.cram.build
Class CramContainerHeaderIterator
java.lang.Object
htsjdk.samtools.cram.build.CramContainerIterator
htsjdk.samtools.cram.build.CramContainerHeaderIterator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Iterator<Container>
Iterate over CRAM containers from an input stream, and unlike
CramContainerIterator
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 -
Method Summary
Modifier and TypeMethodDescriptionprotected Container
containerFromStream
(CountingInputStream countingStream) Consume the entirety of the next container from the stream, but retain only the header.Methods inherited from class htsjdk.samtools.cram.build.CramContainerIterator
close, getCramHeader, getSamFileHeader, 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 Details
-
CramContainerHeaderIterator
-
-
Method Details
-
containerFromStream
Consume the entirety of the next container from the stream, but retain only the header. This is intended as a performance optimization, because it does not decode block data.- Overrides:
containerFromStream
in classCramContainerIterator
- Parameters:
countingStream
- theCountingInputStream
to read from- Returns:
- The next Container's header from the stream, returned as a Container.
- See Also:
-