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.
SMILESReader
IChemObjectReader.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()
File IO generally does not support removing of entries.
|
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.
|
accepts, handleError, handleError, handleError, handleError, setErrorHandler, setReaderMode
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addChemObjectIOListener, addSetting, addSettings, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
forEachRemaining
public static final String BAD_SMILES_INPUT
public IteratingSMILESReader(Reader in, IChemObjectBuilder builder)
in
- The Reader to read frombuilder
- The builder to useDefaultChemObjectBuilder
,
SilentChemObjectBuilder
public IteratingSMILESReader(InputStream in, IChemObjectBuilder builder)
in
- The input streambuilder
- The builderpublic IResourceFormat getFormat()
SMILESFormat
public boolean hasNext()
public IAtomContainer next()
public void close() throws IOException
IOException
- if there is an error during closingpublic void remove()
DefaultIteratingChemObjectReader
remove
in interface Iterator<IAtomContainer>
remove
in class DefaultIteratingChemObjectReader<IAtomContainer>
public void setReader(Reader reader)
IChemObjectReader
public void setReader(InputStream reader)
IChemObjectReader
Copyright © 2018. All Rights Reserved.