Class ShelXWriter

    • Constructor Detail

      • ShelXWriter

        public ShelXWriter​(Writer out)
        Constructs a new ShelXWriter class. Output will be stored in the Writer class given as parameter.
        out - Writer to redirect the output to.
      • ShelXWriter

        public ShelXWriter()
    • Method Detail

      • close

        public void close()
                   throws IOException
        Flushes the output and closes this object.
        IOException - when the wrapper IO class cannot be closed.
      • accepts

        public boolean accepts​(Class<? extends IChemObject> classObject)
        Description copied from interface: IChemObjectIO
        Returns whether the given IChemObject can be read or written.
        classObject - IChemObject of which is tested if it can be handled.
        true, if the IChemObject can be handled.
      • write

        public void write​(IChemObject object)
                   throws CDKException
        Serializes the IChemObject to ShelX and redirects it to the output Writer.
        object - A Molecule of MoleculeSet object
        CDKException - is thrown if the output does not support the data in the object