public class DataFileReader12<D> extends Object implements FileReader<D>, Closeable
| Constructor and Description |
|---|
DataFileReader12(SeekableInput sin,
DatumReader<D> reader)
Construct a reader for a file.
|
| Modifier and Type | Method and Description |
|---|---|
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.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEachRemainingforEach, spliteratorpublic DataFileReader12(SeekableInput sin, DatumReader<D> reader) throws IOException
IOExceptionpublic byte[] getMeta(String key)
public long getMetaLong(String key)
public Schema getSchema()
getSchema in interface FileReader<D>public D next(D reuse) throws IOException
next in interface FileReader<D>reuse - an instance to reuse.IOExceptionpublic void seek(long position)
throws IOException
DataFileWriter.sync().IOExceptionpublic void sync(long position)
throws IOException
sync in interface FileReader<D>IOExceptionpublic boolean pastSync(long position)
throws IOException
pastSync in interface FileReader<D>IOExceptionpublic long tell()
throws IOException
tell in interface FileReader<D>IOExceptionpublic void close()
throws IOException
close in interface Closeableclose in interface AutoCloseableIOExceptionCopyright © 2009–2020 The Apache Software Foundation. All rights reserved.