Class FlatFileRecordReader

  • All Implemented Interfaces:
    org.jeasy.batch.core.reader.RecordReader<java.lang.String>

    public class FlatFileRecordReader
    extends org.jeasy.batch.core.reader.AbstractFileRecordReader<java.lang.String>
    A RecordReader implementation that reads data from a flat file. This reader produces StringRecord instances.
    Author:
    Mahmoud Ben Hassine ([email protected])
    • Field Summary

      • Fields inherited from class org.jeasy.batch.core.reader.AbstractFileRecordReader

        charset, path
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void close()  
      void open()  
      org.jeasy.batch.core.record.StringRecord readRecord()  
      • Methods inherited from class org.jeasy.batch.core.reader.AbstractFileRecordReader

        getCharset, getPath
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • FlatFileRecordReader

        public FlatFileRecordReader​(java.nio.file.Path path)
        Create a new FlatFileRecordReader.
        Parameters:
        path - of the file to read records from
      • FlatFileRecordReader

        public FlatFileRecordReader​(java.nio.file.Path path,
                                    java.nio.charset.Charset charset)
        Create a new FlatFileRecordReader.
        Parameters:
        path - of the file to read records from
        charset - of the input file
    • Method Detail

      • readRecord

        public org.jeasy.batch.core.record.StringRecord readRecord()
                                                            throws java.io.IOException
        Throws:
        java.io.IOException
      • open

        public void open()
                  throws java.lang.Exception
        Throws:
        java.lang.Exception
      • close

        public void close()
                   throws java.io.IOException
        Throws:
        java.io.IOException