public class IteratingSMILESReader extends DefaultIteratingChemObjectReader<IAtomContainer>
BAD_SMILES_INPUT is set to the attempted
input. The error is also logged.
For parsing each SMILES it still uses the normal SMILESReader.
SMILESReaderIChemObjectReader.Mode| Modifier and Type | Field and Description |
|---|---|
static String |
BAD_SMILES_INPUT
Store the problem input as a property.
|
errorHandler, mode| Constructor and Description |
|---|
IteratingSMILESReader(InputStream in,
IChemObjectBuilder builder)
Constructs a new IteratingSMILESReader that can read Molecule from a given InputStream and IChemObjectBuilder.
|
IteratingSMILESReader(Reader in,
IChemObjectBuilder builder)
Constructs a new IteratingSMILESReader that can read Molecule from a given Reader.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Close the reader.
|
IResourceFormat |
getFormat()
Get the format for this reader.
|
boolean |
hasNext()
Checks whether there is another molecule to read.
|
IAtomContainer |
next()
Get the next molecule from the stream.
|
void |
remove() |
void |
setReader(InputStream reader) |
void |
setReader(Reader reader) |
accepts, handleError, handleError, handleError, handleError, setErrorHandler, setReaderModeaddChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChemObjectIOListener, addSetting, addSettings, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerforEachRemainingpublic static final String BAD_SMILES_INPUT
public IteratingSMILESReader(Reader in, IChemObjectBuilder builder)
in - The Reader to read frombuilder - The builder to useDefaultChemObjectBuilder,
SilentChemObjectBuilderpublic IteratingSMILESReader(InputStream in, IChemObjectBuilder builder)
in - The input streambuilder - The builderpublic IResourceFormat getFormat()
SMILESFormatpublic boolean hasNext()
public IAtomContainer next()
public void close()
throws IOException
IOException - if there is an error during closingpublic void remove()
remove in interface Iterator<IAtomContainer>remove in class DefaultIteratingChemObjectReader<IAtomContainer>public void setReader(Reader reader)
public void setReader(InputStream reader)
Copyright © 2017. All rights reserved.