private void readSingleDataFile(Task task, DdlUtilsDataHandling handling, File dataFile, Writer output)
    {
        if (!dataFile.exists())
        {
            task.log("Could not find data file "+dataFile.getAbsolutePath(), Project.MSG_ERR);
        }
        else if (!dataFile.isFile())
        {
            task.log("Path "+dataFile.getAbsolutePath()+" does not denote a data file", Project.MSG_ERR);
        }
        else if (!dataFile.canRead())
        {
            task.log("Could not read data file "+dataFile.getAbsolutePath(), Project.MSG_ERR);
        }
        else
        {
            try
            {
                FileReader reader = new FileReader(dataFile.getAbsolutePath());

                handling.getInsertDataSql(reader, output);
                output.flush();
                output.close();
                task.log("Read data file "+dataFile.getAbsolutePath(), Project.MSG_INFO);
            }
            catch (Exception ex)
            {
                if (isFailOnError())
                {
                    throw new BuildException("Could not read data file "+dataFile.getAbsolutePath(), ex);
                }
            }
        }
    }
private void readSingleDataFile ( Task task , DdlUtilsDataHandling handling , File dataFile , Writer output ) { if ( ! dataFile . exists ( ) ) { task . log ( "Could not find data file " + dataFile . getAbsolutePath ( ) , Project . MSG_ERR ) ; } else if ( ! dataFile . isFile ( ) ) { task . log ( "Path " + dataFile . getAbsolutePath ( ) + " does not denote a data file" , Project . MSG_ERR ) ; } else if ( ! dataFile . canRead ( ) ) { task . log ( "Could not read data file " + dataFile . getAbsolutePath ( ) , Project . MSG_ERR ) ; } else { try { FileReader reader = new FileReader ( dataFile . getAbsolutePath ( ) ) ; handling . getInsertDataSql ( reader , output ) ; output . flush ( ) ; output . close ( ) ; task . log ( "Read data file " + dataFile . getAbsolutePath ( ) , Project . MSG_INFO ) ; } catch ( Exception ex ) { if ( isFailOnError ( ) ) { throw new BuildException ( "Could not read data file " + dataFile . getAbsolutePath ( ) , ex ) ; } } } }
Reads a single data file.

@param task       The parent task
@param reader     The data reader
@param schemaFile The schema file