|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--com.adventnet.utilities.xml.sax.ErrorHandlerImpl
An implementation of the org.xml.sax.ErrorHandler interface.
This ErrorHandler implementation logs the error messages generated while parsing the XML file to a logger.
If an application requires to log errors generated while parsing an XML file, this class can be set as an ErrorHandler using the setErrorHandler method of the parser.
| Field Summary | |
(package private) Log |
log
|
| Constructor Summary | |
ErrorHandlerImpl()
Creates an error handler that logs messages to the default logger. |
|
ErrorHandlerImpl(java.lang.String loggerName)
Creates an error handler that logs messages to the specified logger. |
|
| Method Summary | |
void |
error(org.xml.sax.SAXParseException e)
Logs the error message with Debug Level: ERROR |
void |
fatalError(org.xml.sax.SAXParseException e)
Logs the error message with Debug Level: FATAL |
boolean |
isWriteToFile()
Determines whether to write to log file or not. |
void |
setWriteToFile(boolean writeToFile)
Enables writing to a log file. |
void |
warning(org.xml.sax.SAXParseException e)
Logs the error message with Debug Level: WARN |
| Methods inherited from class java.lang.Object |
|
| Field Detail |
Log log
| Constructor Detail |
public ErrorHandlerImpl()
public ErrorHandlerImpl(java.lang.String loggerName)
loggerName - Specify the name of the logger to be used| Method Detail |
public void setWriteToFile(boolean writeToFile)
writeToFile - The boolean value that specifies whether to
write to the log file. When this is false, error messages are
shown in the console.public boolean isWriteToFile()
boolean true if writing to log file is enabled, false otherwise.public void error(org.xml.sax.SAXParseException e)
e - The SAXParseException that occured while parsing the XML.
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXException
e - The SAXParseException that occured while parsing the XML.public void warning(org.xml.sax.SAXParseException e)
e - The SAXParseException that occured while parsing the XML.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||