/** * Reads a IChemObject of type object from input. * Supported types are: ChemFile. * * @param object type of requested IChemObject * @return the content in a ChemFile object */ @Override public <T extends IChemObject> T read(T object) throws CDKException { if (object instanceof IChemFile) { return (T) readChemFile((IChemFile) object); } else { throw new CDKException("Only supported is reading of ChemFile objects."); } }