Class FileConverter


  • public abstract class FileConverter
    extends DataConverter
    Parent class for DataConverters that read from files
    Author:
    Mark Woodbridge
    • Constructor Detail

      • FileConverter

        public FileConverter​(ItemWriter writer,
                             Model model)
        Constructor
        Parameters:
        writer - the Writer used to output the resultant items
        model - the data model
    • Method Detail

      • process

        public abstract void process​(java.io.Reader reader)
                              throws java.lang.Exception
        Perform the currentFile conversion
        Parameters:
        reader - BufferedReader used as input
        Throws:
        java.lang.Exception - if an error occurs during processing
      • setCurrentFile

        public void setCurrentFile​(java.io.File currentFile)
        Set the current File that is being processed. Called by FileConverterTask.execute().
        Parameters:
        currentFile - the current File that is being processed
      • getCurrentFile

        public java.io.File getCurrentFile()
        Return the File that is currently being converted.
        Returns:
        the current File