public class ReaderFactory extends Object
StringReader stringReader = "<molecule/>";
ChemObjectReader reader = new ReaderFactory().createReader(stringReader);
| Constructor and Description |
|---|
ReaderFactory()
Constructs a ReaderFactory which tries to detect the format in the
first 65536 chars.
|
ReaderFactory(int headerLength)
Constructs a ReaderFactory which tries to detect the format in the
first given number of chars.
|
| Modifier and Type | Method and Description |
|---|---|
ISimpleChemObjectReader |
createReader(IChemFormat format)
Creates a new IChemObjectReader based on the given IChemFormat.
|
ISimpleChemObjectReader |
createReader(InputStream input)
Detects the format of the Reader input, and if known, it will return
a CDK Reader to read the format, or null when the reader is not
implemented.
|
ISimpleChemObjectReader |
createReader(Reader input)
Detects the format of the Reader input, and if known, it will return
a CDK Reader to read the format.
|
List<IChemFormatMatcher> |
getFormats() |
void |
registerFormat(IChemFormatMatcher format)
Registers a format for detection.
|
public ReaderFactory()
public ReaderFactory(int headerLength)
headerLength - length of the header in number of charspublic void registerFormat(IChemFormatMatcher format)
public List<IChemFormatMatcher> getFormats()
public ISimpleChemObjectReader createReader(InputStream input) throws IOException
IOExceptioncreateReader(Reader)public ISimpleChemObjectReader createReader(IChemFormat format)
createReader(InputStream)public ISimpleChemObjectReader createReader(Reader input) throws IOException
IOExceptioncreateReader(InputStream)Copyright © 2018. All Rights Reserved.