| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avro.file.DataFileReader12<D>
public class DataFileReader12<D>
Read files written by Avro version 1.2.
| Constructor Summary | |
|---|---|
DataFileReader12(SeekableInput sin,
                 DatumReader<D> reader)
Construct a reader for a file.  | 
|
| Method Summary | |
|---|---|
 void | 
close()
Close this reader.  | 
 byte[] | 
getMeta(String key)
Return the value of a metadata property.  | 
 long | 
getMetaLong(String key)
Return the value of a metadata property.  | 
 String | 
getMetaString(String key)
Return the value of a metadata property.  | 
 Schema | 
getSchema()
Return the schema used in this file.  | 
 boolean | 
hasNext()
 | 
 Iterator<D> | 
iterator()
 | 
 D | 
next()
 | 
 D | 
next(D reuse)
Return the next datum in the file.  | 
 boolean | 
pastSync(long position)
Return true if past the next synchronization point after a position.  | 
 void | 
remove()
 | 
 void | 
seek(long position)
Move to the specified synchronization point, as returned by DataFileWriter.sync(). | 
 void | 
sync(long position)
Move to the next synchronization point after a position.  | 
 long | 
tell()
Return the current position in the input.  | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Constructor Detail | 
|---|
public DataFileReader12(SeekableInput sin,
                        DatumReader<D> reader)
                 throws IOException
IOException| Method Detail | 
|---|
public byte[] getMeta(String key)
public String getMetaString(String key)
public long getMetaLong(String key)
public Schema getSchema()
getSchema in interface FileReader<D>public Iterator<D> iterator()
iterator in interface Iterable<D>public boolean hasNext()
hasNext in interface Iterator<D>public D next()
next in interface Iterator<D>public void remove()
remove in interface Iterator<D>
public D next(D reuse)
       throws IOException
next in interface FileReader<D>reuse - an instance to reuse.
IOException
public void seek(long position)
          throws IOException
DataFileWriter.sync().
IOException
public void sync(long position)
          throws IOException
sync in interface FileReader<D>IOException
public boolean pastSync(long position)
                 throws IOException
pastSync in interface FileReader<D>IOException
public long tell()
          throws IOException
tell in interface FileReader<D>IOException
public void close()
           throws IOException
close in interface CloseableIOException
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||