Interface DataReader<T>
-
- Type Parameters:
T
- data type of the series to be read
- All Known Implementing Classes:
DataReaderFactory.DataReaderWithStats
public interface DataReader<T>
A basic interface for reading data. The details of what is data and from where to read are implementation specific. Pure consumer.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
readData()
Read a single objectT
readDataArray(int length)
Read an array of specified length.
-
-
-
Method Detail
-
readData
T readData() throws IOException
Read a single object- Returns:
- an object or a primitive value read
- Throws:
IOException
- as per java IO contract
-
readDataArray
T readDataArray(int length) throws IOException
Read an array of specified length. Normally this is a byte array. The intent here is optimization: reading an array may be faster than reading elements one by one.- Parameters:
length
- the length of the array to be read- Returns:
- the array of objects
- Throws:
IOException
- as per java IO contract
-
-