Package uk.ac.starlink.table.storage
Class IndexedStreamColumnStore
- java.lang.Object
-
- uk.ac.starlink.table.storage.IndexedStreamColumnStore
-
- All Implemented Interfaces:
ColumnStore
public class IndexedStreamColumnStore extends java.lang.Object implements ColumnStore
ColumnStore implementation which uses two streamed files to store a variable number of variable-length data items.- Since:
- 21 Jun 2006
- Author:
- Mark Taylor
-
-
Constructor Summary
Constructors Constructor Description IndexedStreamColumnStore(Codec codec, java.io.File dataFile, java.io.File indexFile)Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidacceptCell(java.lang.Object value)Writes a datum to this store.ColumnReadercreateReader()Returns an object that can provide random access to the cells written to this store.voidendCells()Signals that no more calls toacceptCellwill be made, and that calls tocreateReadermay be made.
-
-
-
Constructor Detail
-
IndexedStreamColumnStore
public IndexedStreamColumnStore(Codec codec, java.io.File dataFile, java.io.File indexFile) throws java.io.IOException
Constructor.- Parameters:
codec- encoder/decoder for the type of data stored in this columndataFile- filename used for storing the data; it is the caller's responsibility to clear this upindexFile- filename used for storing offset values; it is the caller's responsibility to clear this up- Throws:
java.io.IOException
-
-
Method Detail
-
acceptCell
public void acceptCell(java.lang.Object value) throws java.io.IOExceptionDescription copied from interface:ColumnStoreWrites a datum to this store.- Specified by:
acceptCellin interfaceColumnStore- Parameters:
value- the value to add- Throws:
java.io.IOException
-
endCells
public void endCells() throws java.io.IOExceptionDescription copied from interface:ColumnStoreSignals that no more calls toacceptCellwill be made, and that calls tocreateReadermay be made.- Specified by:
endCellsin interfaceColumnStore- Throws:
java.io.IOException
-
createReader
public ColumnReader createReader()
Description copied from interface:ColumnStoreReturns an object that can provide random access to the cells written to this store.- Specified by:
createReaderin interfaceColumnStore- Returns:
- column cell reader
-
-