maito.datacollecting.file
Class FileDataSource

java.lang.Object
  extended by maito.datacollecting.file.FileDataSource
All Implemented Interfaces:
DataSource

public class FileDataSource
extends java.lang.Object
implements DataSource

Reads a file in lines and passes them to a RecordParser for parsing. The buffering is done in the parser.

Author:
Väinö Ala-Härkönen This software is released under the GNU GPL license

Constructor Summary
FileDataSource(java.util.Properties parameters, RecordParser recordParser)
           
 
Method Summary
 void update()
          Reads the source file in blocks and passes them on to the specified recordParser When the end of the file is reached, sends a null block.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FileDataSource

public FileDataSource(java.util.Properties parameters,
                      RecordParser recordParser)
               throws DataSourceException
Throws:
DataSourceException
Method Detail

update

public void update()
            throws DataSourceException
Reads the source file in blocks and passes them on to the specified recordParser When the end of the file is reached, sends a null block.

Specified by:
update in interface DataSource
Throws:
DataSourceException