Package chemaxon.formats
Interface MolImporterInterface
- All Known Implementing Classes:
DocumentAnnotator,MoleculeImporter,MolImporter
Interface for molecule importer classes.
- Since:
- 5.7
-
Method Details
-
read
Reads the next molecule from the stream/file.- Returns:
- the next molecule, or
nullif no more molecules can be imported. - Throws:
IOException- if an error occurred during reading.
-
close
Closes the underlying input stream.WARNING: call this after reading molecules to close concurrent processing properly.
- Throws:
IOException- if an error occurred.
-
getMolStream
Creates aMoleculestream with the iterator of the importer.WARNING: the default implementation throws
UnsupportedOperationException, but certain implementations may support this method. -
getMDocumentStream
Creates anMDocumentstream with the iterator of the importer. AddsMDocumentto molecules without document.WARNING: the default implementation throws
UnsupportedOperationException, but certain implementations may support this method.
-