public static final class FileRecordFormatAdapter.Reader<T> extends Object implements BulkFormat.Reader<T>
StreamFormatAdapter.Reader instead.
The reader adapter, from FileRecordFormat.Reader to BulkFormat.Reader.
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Closes the reader and should release all resources.
|
BulkFormat.RecordIterator<T> |
readBatch()
Reads one batch.
|
@Nullable public BulkFormat.RecordIterator<T> readBatch() throws IOException
BulkFormat.ReaderThe returned iterator object and any contained objects may be held onto by the file source for some time, so it should not be immediately reused by the reader.
To implement reuse and to save object allocation, consider using a Pool and recycle objects into the Pool in the
the BulkFormat.RecordIterator.releaseBatch() method.
readBatch in interface BulkFormat.Reader<T>IOExceptionpublic void close()
throws IOException
BulkFormat.Readerclose in interface Closeableclose in interface AutoCloseableclose in interface BulkFormat.Reader<T>IOExceptionCopyright © 2014–2025 The Apache Software Foundation. All rights reserved.