Interface StreamFormat.Reader<T>
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
TextLineInputFormat.Reader
- Enclosing interface:
- StreamFormat<T>
The actual reader that reads the records.
-
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes the reader to release all resources.default CheckpointedPositionOptionally returns the current position of the reader.read()Reads the next record.
-
Method Details
-
read
Reads the next record. Returnsnullwhen the input has reached its end.- Throws:
IOException
-
close
Closes the reader to release all resources.- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable- Throws:
IOException
-
getCheckpointedPosition
Optionally returns the current position of the reader. This can be implemented by readers that want to speed up recovery from a checkpoint.The current position of the reader is the position of the next record that will be returned in a call to
read(). This can be implemented by readers that want to speed up recovery from a checkpoint.See the
top-level class comment(section "Checkpointing") for details.
-