Interface LineProcessor

All Known Implementing Classes:
RealObject.DescriptionLineProcessor

interface LineProcessor

Specification for file processing callbacks. Classes which implement this interface work with the Utility.processFile() method to process lines in a file.

See Also:
Utility.processFile(java.lang.String, LineProcessor)

Method Summary
 void ioException(java.lang.String fileName, java.io.IOException e)
          Called when the driver gets an IO exception processing a file.
 void noSuchFile(java.lang.String fileName)
          Called when the driver is unable to open a file.
 boolean processLine(java.lang.String line, int number)
          Called to process each line in the file.
 

Method Detail

ioException

public void ioException(java.lang.String fileName,
                        java.io.IOException e)
Called when the driver gets an IO exception processing a file. Allows the callback to provide detailed feedback.
Parameters:
fileName - the name of the file being processed
e - the exception

noSuchFile

public void noSuchFile(java.lang.String fileName)
Called when the driver is unable to open a file. Allows the callback to provide detailed feedback.
Parameters:
fileName - the name of the missing file

processLine

public boolean processLine(java.lang.String line,
                           int number)
Called to process each line in the file.
Parameters:
line - the text of the line, not including any trailing newline
number - the sequential number of the line within the file
Returns:
false if the method had some problem with the line; true otherwise