public class StreamVariableList<T extends BaseEntity> extends BaseList<T>
Entities in the underlying data structure are either fixed length where the data that represents them always contains the same number of bytes, or variable length where the number of bytes to represent the entity varies.
This class uses the offset of the first byte of the entities data in the underlying data structure in the accessor. As such the list isn't being used as a traditional list because items are not retrieved by their index in the list, but by there offset in the underlying data structure.
The constructor will read the header information about the underlying data structure. The data for each entity is only loaded when requested via the accessor. A cache is used to avoid creating duplicate objects when requested multiple times.
Data sources which don't support seeking can not be used. Specifically compressed data structures can not be used with these lists.
Should not be referenced directly.
| Constructor and Description |
|---|
StreamVariableList(Dataset dataSet,
BinaryReader reader,
Source source,
BaseEntityFactory<T> entityFactory)
Constructs a new instance of VariableList
|
| Modifier and Type | Method and Description |
|---|---|
protected T |
createEntity(int offset,
BinaryReader reader)
Creates a new entity of type T.
|
Iterator<T> |
iterator() |
dispose, get, getCount, getPercentageMisses, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic StreamVariableList(Dataset dataSet, BinaryReader reader, Source source, BaseEntityFactory<T> entityFactory)
dataSet - The DetectorDataSet being createdreader - Reader connected to the source data structure and
positioned to start readingentityFactory - Factory to build entities of type Tsource - Reference to the underlying data structureprotected T createEntity(int offset, BinaryReader reader) throws IOException
createEntity in class BaseList<T extends BaseEntity>offset - The offset of the entity being createdreader - Reader connected to the source data structure and
positioned to start readingIOException