org.openscience.cdk.io
Interface IChemObjectWriter

All Superinterfaces:
Closeable, IChemObjectIO
All Known Implementing Classes:
CDKOWLWriter, CDKSourceCodeWriter, CMLWriter, CrystClustWriter, DefaultChemObjectWriter, GaussianInputWriter, HINWriter, MDLRXNWriter, MDLV2000Writer, Mol2Writer, Mopac7Writer, PDBWriter, RGroupQueryWriter, RssWriter, SDFWriter, ShelXWriter, SMILESWriter, XYZWriter

public interface IChemObjectWriter
extends IChemObjectIO

This class is the interface that all IO writers should implement. Programs need only care about this interface for any kind of IO.

Currently, database IO and file IO is supported. Internet IO is expected.

Version:
$Date$
Belongs to CDK module:
io
Source code:
cdk-1.4.x

Method Summary
 void setWriter(OutputStream writer)
          Sets the OutputStream from which this ChemObjectWriter should write the contents.
 void setWriter(Writer writer)
          Sets the Writer from which this ChemObjectWriter should write the contents.
 void write(IChemObject object)
          Writes the content of "object" to output
 
Methods inherited from interface org.openscience.cdk.io.IChemObjectIO
accepts, addChemObjectIOListener, addSetting, addSettings, close, getFormat, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListener
 

Method Detail

write

void write(IChemObject object)
           throws CDKException
Writes the content of "object" to output

Parameters:
object - the object of which the content is outputed
Throws:
CDKException - is thrown if the output does not support the data in the object

setWriter

void setWriter(Writer writer)
               throws CDKException
Sets the Writer from which this ChemObjectWriter should write the contents.

Throws:
CDKException

setWriter

void setWriter(OutputStream writer)
               throws CDKException
Sets the OutputStream from which this ChemObjectWriter should write the contents.

Throws:
CDKException