public class ReaderFactory extends Object
IIteratingChemObjectReaders.
For some reason, CDK (as of 1.5.13) doesn't have a factory class
that can guess the file format and return the appropriate
IIteratingChemObjectReader for it, but it does have one
for the non-iterating, read everything into memory Reader.
This is a very basic factory that can only determine a file encoded in SMILES format or MOL/SDF format. If the file is compressed, it must be uncompressed before it is given to this factory.
| Constructor and Description |
|---|
ReaderFactory() |
| Modifier and Type | Method and Description |
|---|---|
static gov.nih.ncats.molwitch.cdk.ReaderFactory.GuessResult |
create(BufferedReader reader,
org.openscience.cdk.io.formats.IResourceFormat format) |
static gov.nih.ncats.molwitch.cdk.ReaderFactory.GuessResult |
guessReaderFor(BufferedReader reader)
Get the file format for the contents of the given
BufferedReader
and return the appropriate IIteratingChemObjectReader for that format. |
public static gov.nih.ncats.molwitch.cdk.ReaderFactory.GuessResult guessReaderFor(BufferedReader reader) throws IOException
BufferedReader
and return the appropriate IIteratingChemObjectReader for that format.reader - the BufferedReader to parse; can not be null
and must support mark/reset.IIteratingChemObjectReader that can parse
the input.IOException - if there is a problem reading the input data.public static gov.nih.ncats.molwitch.cdk.ReaderFactory.GuessResult create(BufferedReader reader, org.openscience.cdk.io.formats.IResourceFormat format) throws IOException
IOExceptionCopyright © 2019 NIH/NCATS. All rights reserved.