The type independent portion of rader. More...
#include <DataFile.hh>
Public Member Functions | |
Decoder & | decoder () |
Returns the current decoder for this reader. | |
bool | hasMore () |
Returns true if and only if there is more to read. | |
void | decr () |
Decrements the number of objects yet to read. | |
DataFileReaderBase (const char *filename) | |
Constructs the reader for the given file and the reader is expected to use the schema that is used with data. More... | |
void | init () |
Initializes the reader so that the reader and writer schemas are the same. | |
void | init (const ValidSchema &readerSchema) |
Initializes the reader to read objects according to the given schema. More... | |
const ValidSchema & | readerSchema () |
Returns the schema for this object. | |
const ValidSchema & | dataSchema () |
Returns the schema stored with the data file. | |
void | close () |
Closes the reader. More... | |
The type independent portion of rader.
avro::DataFileReaderBase::DataFileReaderBase | ( | const char * | filename | ) |
Constructs the reader for the given file and the reader is expected to use the schema that is used with data.
This function should be called exactly once after constructing the DataFileReaderBase object.
void avro::DataFileReaderBase::close | ( | ) |
Closes the reader.
No further operation is possible on this reader.
void avro::DataFileReaderBase::init | ( | const ValidSchema & | readerSchema | ) |
Initializes the reader to read objects according to the given schema.
This gives an opportinity for the reader to see the schema in the data file before deciding the right schema to use for reading. This must be called exactly once after constructing the DataFileReaderBase object.