Package picard.illumina.parser.readers
Class MMapBackedIteratorFactory
java.lang.Object
picard.illumina.parser.readers.MMapBackedIteratorFactory
MMapBackedIteratorFactory a file reader that takes a header size and a binary file, maps the file to
a read-only byte buffer and provides methods to retrieve the header as it's own bytebuffer and create
iterators of different data types over the values of file (starting after the end of the header).
Values provided by the MMappedBinaryFileReader are read as if they are little endian.
Note (read to end):
This class IS thread-safe and immutable though the iterator and ByteBuffers it produces are NOT.
The values read are assumed to be signed, NO promoting/sign conversion happens in this class.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic picard.illumina.parser.readers.BinaryFileIterator<ByteBuffer>
getByteBufferIterator
(int headerSize, int elementSize, File binaryFile) static picard.illumina.parser.readers.BinaryFileIterator<Byte>
getByteIterator
(int headerSize, File binaryFile) static picard.illumina.parser.readers.BinaryFileIterator<Float>
getFloatIterator
(int headerSize, File binaryFile) static picard.illumina.parser.readers.BinaryFileIterator<Integer>
getIntegerIterator
(int headerSize, File binaryFile) static picard.illumina.parser.readers.BinaryFileIterator<Long>
getLongIterator
(int headerSize, File binaryFile)
-
Constructor Details
-
MMapBackedIteratorFactory
public MMapBackedIteratorFactory()
-
-
Method Details
-
getIntegerIterator
-
getByteIterator
-
getFloatIterator
-
getLongIterator
-
getByteBufferIterator
public static picard.illumina.parser.readers.BinaryFileIterator<ByteBuffer> getByteBufferIterator(int headerSize, int elementSize, File binaryFile)
-