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.
        Parameters:
        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.
        Throws:
        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.
        Parameters:
        classObject - IChemObject of which is tested if it can be handled.
        Returns:
        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.
        Parameters:
        object - A Molecule of MoleculeSet object
        Throws:
        CDKException - is thrown if the output does not support the data in the object