Package org.apache.avro.file
Class DataFileReader12<D>
java.lang.Object
org.apache.avro.file.DataFileReader12<D>
- All Implemented Interfaces:
- Closeable,- AutoCloseable,- Iterable<D>,- Iterator<D>,- FileReader<D>
Read files written by Avro version 1.2.
- 
Constructor SummaryConstructorsConstructorDescriptionDataFileReader12(SeekableInput sin, DatumReader<D> reader) Construct a reader for a file.
- 
Method SummaryModifier and TypeMethodDescriptionvoidclose()Close this reader.byte[]Return the value of a metadata property.longgetMetaLong(String key) Return the value of a metadata property.getMetaString(String key) Return the value of a metadata property.Return the schema used in this file.booleanhasNext()iterator()next()Return the next datum in the file.booleanpastSync(long position) Return true if past the next synchronization point after a position.voidremove()voidseek(long position) Move to the specified synchronization point, as returned byDataFileWriter.sync().voidsync(long position) Move to the next synchronization point after a position.longtell()Return the current position in the input.Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface java.lang.IterableforEach, spliteratorMethods inherited from interface java.util.IteratorforEachRemaining
- 
Constructor Details- 
DataFileReader12Construct a reader for a file.- Throws:
- IOException
 
 
- 
- 
Method Details- 
getMetaReturn the value of a metadata property.
- 
getMetaStringReturn the value of a metadata property.
- 
getMetaLongReturn the value of a metadata property.
- 
getSchemaReturn the schema used in this file.- Specified by:
- getSchemain interface- FileReader<D>
 
- 
iterator
- 
hasNextpublic boolean hasNext()
- 
next
- 
removepublic void remove()
- 
nextReturn the next datum in the file.- Specified by:
- nextin interface- FileReader<D>
- Parameters:
- reuse- an instance to reuse.
- Throws:
- IOException
 
- 
seekMove to the specified synchronization point, as returned byDataFileWriter.sync().- Throws:
- IOException
 
- 
syncMove to the next synchronization point after a position.- Specified by:
- syncin interface- FileReader<D>
- Throws:
- IOException
 
- 
pastSyncReturn true if past the next synchronization point after a position.- Specified by:
- pastSyncin interface- FileReader<D>
- Throws:
- IOException
 
- 
tellReturn the current position in the input.- Specified by:
- tellin interface- FileReader<D>
- Throws:
- IOException
 
- 
closeClose this reader.- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Throws:
- IOException
 
 
-