|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface IChemObjectReader
This interface specifies the common functionality all IO readers should provide.
IO readers should not implement this interface directly, but rather implement
one of its child interfaces: 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| Nested Class Summary | |
|---|---|
static class |
IChemObjectReader.Mode
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from interface org.openscience.cdk.io.IChemObjectIO |
|---|
accepts, addChemObjectIOListener, addSetting, addSettings, close, getFormat, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener |
| Method Detail |
|---|
void setReader(Reader reader)
throws CDKException
CDKException
void setReader(InputStream reader)
throws CDKException
CDKExceptionvoid 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
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||