public final class JNIInChIHandler implements InChIHandler {
@Override public IAtomContainer parse(InChI inchi) throws CDKException {
InChIGeneratorFactory igf = InChIGeneratorFactory.getInstance();
InChIToStructure its = igf.getInChIToStructure(inchi.getInChI(),
DefaultChemObjectBuilder.getInstance());
if (its.getReturnStatus() != INCHI_RET.OKAY && its.getReturnStatus() != INCHI_RET.WARNING)
throw new CDKException("Could not parse InChI - " + its.getMessage());
return its.getAtomContainer();
}