ST-Developer Java Reference

com.steptools.stdev.p21
Class Part21LoggingParser

java.lang.Object
  extended by com.steptools.stdev.p21.Part21Parser
      extended by com.steptools.stdev.p21.Part21LoggingParser

public class Part21LoggingParser
extends Part21Parser

Subclass of Paer21Parser that provides an error reporting facility.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.steptools.stdev.p21.Part21Parser
Part21Parser.State
 
Field Summary
 PrintStream out
          The output stream for the parser
 
Fields inherited from class com.steptools.stdev.p21.Part21Parser
convert, fail_fast, keep_partial, status_freq
 
Constructor Summary
Part21LoggingParser()
           
Part21LoggingParser(PrintStream ps)
           
 
Method Summary
 void reportError(String fname, int lineno, String message)
          Report an error in the input file.
 void statusUpdate(Part21Parser.State st)
          Display the fraction completed to the log file.
 
Methods inherited from class com.steptools.stdev.p21.Part21Parser
getSchema, parse, parse, parse, parse, parse, parse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

out

public PrintStream out
The output stream for the parser

Constructor Detail

Part21LoggingParser

public Part21LoggingParser(PrintStream ps)
                    throws STDevException
Throws:
STDevException

Part21LoggingParser

public Part21LoggingParser()
                    throws STDevException
Throws:
STDevException
Method Detail

reportError

public void reportError(String fname,
                        int lineno,
                        String message)
Report an error in the input file. This will write the message to the output stream.

Overrides:
reportError in class Part21Parser
Parameters:
fname - The Part21 file.
lineno - The line number where the error occurred.
message - The error message to be reported.

statusUpdate

public void statusUpdate(Part21Parser.State st)
                  throws CanceledException
Display the fraction completed to the log file. By default, this is never called. To activiate, set status_freq to a non-zero value.

Overrides:
statusUpdate in class Part21Parser
Parameters:
st - The parser state information. This can be queried to obtain the number of bytes in the file, the number of bytes ready by the parser, and the number is insteances read.
Throws:
CanceledException - for subtypes to use. This method never throws the exception.

ST-Developer Java Reference