public abstract class DefaultChemObjectReader extends ChemObjectIO implements ISimpleChemObjectReader
IChemObjectReader.Mode| Modifier and Type | Field and Description |
|---|---|
protected IChemObjectReaderErrorHandler |
errorHandler |
protected IChemObjectReader.Mode |
mode |
| Constructor and Description |
|---|
DefaultChemObjectReader() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
fireFrameRead()
Sends a frame read event to the registered ReaderListeners.
|
void |
handleError(String message)
Redirects an error message to the
IChemObjectReaderErrorHandler. |
void |
handleError(String message,
Exception exception)
Redirects an error message to the
IChemObjectReaderErrorHandler. |
void |
handleError(String message,
int row,
int colStart,
int colEnd)
Redirects an error message to the
IChemObjectReaderErrorHandler. |
void |
handleError(String message,
int row,
int colStart,
int colEnd,
Exception exception)
Redirects an error message to the
IChemObjectReaderErrorHandler. |
void |
setErrorHandler(IChemObjectReaderErrorHandler handler)
Sets an error handler that is sent events when file format issues occur.
|
void |
setReaderMode(IChemObjectReader.Mode mode)
Sets the reader mode.
|
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadsetReader, setReaderaccepts, addChemObjectIOListener, addSetting, addSettings, close, getFormat, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerprotected IChemObjectReader.Mode mode
protected IChemObjectReaderErrorHandler errorHandler
protected void fireFrameRead()
public void setReaderMode(IChemObjectReader.Mode mode)
IChemObjectReadersetReaderMode in interface IChemObjectReaderpublic void setErrorHandler(IChemObjectReaderErrorHandler handler)
setErrorHandler in interface IChemObjectReaderhandler - IChemObjectReaderErrorHandler to send error
messages to.public void handleError(String message) throws CDKException
IChemObjectReaderErrorHandler.
Throws an CDKException when in STRICT IChemObjectReader.Mode.handleError in interface IChemObjectReadermessage - the error message.CDKExceptionpublic void handleError(String message, Exception exception) throws CDKException
IChemObjectReaderErrorHandler.
Throws an CDKException when in STRICT IChemObjectReader.Mode.handleError in interface IChemObjectReadermessage - the error message.exception - the corresponding Exception.CDKExceptionpublic void handleError(String message, int row, int colStart, int colEnd) throws CDKException
IChemObjectReaderErrorHandler.
Throws an CDKException when in STRICT IChemObjectReader.Mode.handleError in interface IChemObjectReadermessage - the error message.row - Row in the file where the error is found.colStart - Start column in the file where the error is found.colEnd - End column in the file where the error is found.CDKExceptionpublic void handleError(String message, int row, int colStart, int colEnd, Exception exception) throws CDKException
IChemObjectReaderErrorHandler.
Throws an CDKException when in STRICT IChemObjectReader.Mode.handleError in interface IChemObjectReadermessage - the error message.row - Row in the file where the error is found.colStart - Start column in the file where the error is found.colEnd - End column in the file where the error is found.exception - the corresponding Exception.CDKExceptionCopyright © 2018. All Rights Reserved.