@ Override public void write ( IChemObject object ) throws CDKException { if ( object instanceof ICrystal ) { writeCrystal ( ( ICrystal ) object ) ; } else { throw new CDKException ( "Only Crystal objects can be read." ) ; } }
Serializes the IChemObject to ShelX and redirects it to the output Writer .