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, wait
forEachRemaining
forEach, spliterator
public DataFileReader12(SeekableInput sin, DatumReader<D> reader) throws IOException
IOException
public 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.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 Closeable
close
in interface AutoCloseable
IOException
Copyright © 2009–2021 The Apache Software Foundation. All rights reserved.