code: @Override
      public void write(IChemObject object) throws CDKException {
          if (object instanceof IReactionSet) {
              writeReactionSet((IReactionSet) object);
          } else if (object instanceof IReaction) {
              writeReaction((IReaction) object);
          } else {
              throw new CDKException("Only supported is writing ReactionSet, Reaction objects.");
          }
      }
docs: Writes a IChemObject to the MDL RXN file formated output.
  It can only output ChemObjects of type Reaction
  
  @param object class must be of type Molecule or MoleculeSet.
  
  @see org.openscience.cdk.ChemFile