public abstract class AbstractBlobReader extends Object implements IBlobReader
IBlobReader
Modifier and Type | Field and Description |
---|---|
protected Map<Long,DataEncoding> |
_dataEncodingBySpectrumId |
protected int[] |
_peaksCounts |
protected int |
_spectraCount |
protected Map<Long,SpectrumHeader> |
_spectrumHeaderById |
protected int[] |
_spectrumSliceStartPositions |
protected org.slf4j.Logger |
logger |
Modifier | Constructor and Description |
---|---|
protected |
AbstractBlobReader(long firstSpectrumId,
long lastSpectrumId,
Map<Long,SpectrumHeader> spectrumHeaderById,
Map<Long,DataEncoding> dataEncodingBySpectrumId)
Abstract constructor
|
Modifier and Type | Method and Description |
---|---|
protected void |
checkDataEncodingIsNotNull(DataEncoding de,
long spectrumId) |
protected void |
checkSpectrumIndexRange(int idx) |
long[] |
getAllSpectrumIds() |
SpectrumSlice[] |
readAllSpectrumSlices(int runSliceId) |
protected SpectrumData |
readSpectrumSliceData(ByteBuffer bbByteBuffer,
int spectrumSliceStartPos,
int peaksBytesLength,
DataEncoding de,
double minMz,
double maxMz)
Read spectrum slice data by using a ByteBuffer as input
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
disposeBlob, getSpectraCount, getSpectrumIdAt, readFilteredSpectrumSliceDataAt, readSpectrumSliceAt, readSpectrumSliceDataAt
protected final org.slf4j.Logger logger
protected int _spectraCount
protected int[] _spectrumSliceStartPositions
protected int[] _peaksCounts
protected Map<Long,SpectrumHeader> _spectrumHeaderById
protected Map<Long,DataEncoding> _dataEncodingBySpectrumId
protected AbstractBlobReader(long firstSpectrumId, long lastSpectrumId, Map<Long,SpectrumHeader> spectrumHeaderById, Map<Long,DataEncoding> dataEncodingBySpectrumId)
spectrumHeaderById
- SpectrumHeader by spectrum iddataEncById
- DataEncoding by spectrum idDataEncoding
public long[] getAllSpectrumIds()
getAllSpectrumIds
in interface IBlobReader
protected SpectrumData readSpectrumSliceData(ByteBuffer bbByteBuffer, int spectrumSliceStartPos, int peaksBytesLength, DataEncoding de, double minMz, double maxMz)
bbByteBuffer
- array of bytes containing the SpectrumSlices of interestspectrumSliceStartPos,
- the starting positionpeaksBytesLength,
- length of bytes used by peaksstructSize,
- size of the struct for a given peakde,
- the corresponding DataEncodingminMz,
- the minimum m/z valuemaxMz,
- the maximum m/z valueprotected void checkSpectrumIndexRange(int idx)
protected void checkDataEncodingIsNotNull(DataEncoding de, long spectrumId) throws StreamCorruptedException
StreamCorruptedException
public SpectrumSlice[] readAllSpectrumSlices(int runSliceId)
readAllSpectrumSlices
in interface IBlobReader
runSliceId
- needed to correctly annotate the SpectrumSliceIBlobReader.readAllSpectrumSlices(int)
Copyright © 2019. All rights reserved.