public interface IChemObjectReader extends IChemObjectIO
ISimpleChemObjectReader
or IIteratingChemObjectReader
.
These sub-interfaces specify the information access methods:
a simple read() method for the ISimpleChemObjectReader
and
more advanced iterator based access for the IIteratingChemObjectReader
(suitable for large files)ISimpleChemObjectReader
,
IIteratingChemObjectReader
Modifier and Type | Interface and Description |
---|---|
static class |
IChemObjectReader.Mode |
Modifier and Type | Method and Description |
---|---|
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 |
setReader(InputStream reader)
Sets the InputStream from which this ChemObjectReader should read
the contents.
|
void |
setReader(Reader reader)
Sets the Reader from which this ChemObjectReader should read
the contents.
|
void |
setReaderMode(IChemObjectReader.Mode mode)
Sets the reader mode.
|
accepts, addChemObjectIOListener, addSetting, addSettings, close, getFormat, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
void setReader(Reader reader) throws CDKException
CDKException
void setReader(InputStream reader) throws CDKException
CDKException
void setReaderMode(IChemObjectReader.Mode mode)
mode
- void setErrorHandler(IChemObjectReaderErrorHandler handler)
handler
- IChemObjectReaderErrorHandler
to send error
messages to.void handleError(String message) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.message
- the error message.CDKException
void handleError(String message, Exception exception) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.message
- the error message.exception
- the corresponding Exception
.CDKException
void handleError(String message, int row, int colStart, int colEnd) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.message
- 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.CDKException
void handleError(String message, int row, int colStart, int colEnd, Exception exception) throws CDKException
IChemObjectReaderErrorHandler
.
Throws an CDKException
when in STRICT IChemObjectReader.Mode
.message
- the error message.exception
- the corresponding Exception
.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.CDKException
Copyright © 2022. All rights reserved.