Class FileRecordReader

    • Constructor Detail

      • FileRecordReader

        public FileRecordReader​(java.nio.file.Path path)
        Create a new FileRecordReader.
        Parameters:
        path - to read files from
      • FileRecordReader

        public FileRecordReader​(java.nio.file.Path path,
                                boolean recursive)
        Create a new FileRecordReader.
        Parameters:
        path - to read files from
        recursive - if the reader should be recursive or not
    • Method Detail

      • open

        public void open()
                  throws java.lang.Exception
        Description copied from interface: RecordReader
        Open the reader.
        Specified by:
        open in interface RecordReader<java.nio.file.Path>
        Throws:
        java.lang.Exception - if an error occurs during reader opening
      • close

        public void close()
                   throws java.lang.Exception
        Description copied from interface: RecordReader
        Close the reader.
        Specified by:
        close in interface RecordReader<java.nio.file.Path>
        Throws:
        java.lang.Exception - if an error occurs during reader closing
      • readRecord

        public FileRecord readRecord()
        Description copied from interface: RecordReader
        Read next record from the data source.
        Specified by:
        readRecord in interface RecordReader<java.nio.file.Path>
        Returns:
        the next record from the data source or null if the end of the data source is reached