public class CDKSourceCodeWriter extends DefaultChemObjectWriter
StringWriter stringWriter = new StringWriter(); ChemObjectWriter writer = new CDKSourceCodeWriter(stringWriter); writer.write((Molecule)molecule); writer.close(); System.out.print(stringWriter.toString());
| Name | Question | Default |
|---|---|---|
| write3DCoordinates | Should 3D coordinates be added? | true |
| builder | Which IChemObjectBuilder should be used? | DefaultChemObjectBuilder |
| write2DCoordinates | Should 2D coordinates be added? | true |
| Constructor and Description |
|---|
CDKSourceCodeWriter() |
CDKSourceCodeWriter(OutputStream out) |
CDKSourceCodeWriter(Writer out)
Constructs a new CDKSourceCodeWriter.
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Class<? extends IChemObject> classObject) |
void |
close()
Flushes the output and closes this object.
|
IResourceFormat |
getFormat() |
int |
getRequiredDataFeatures() |
int |
getSupportedDataFeatures() |
void |
setWriter(OutputStream output) |
void |
setWriter(Writer out) |
void |
write(IChemObject object) |
addChemObjectIOListener, addSetting, addSettings, fireIOSettingQuestion, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitaddChemObjectIOListener, addSetting, addSettings, getIOSettings, getListeners, getSetting, getSetting, getSettings, hasSetting, removeChemObjectIOListenerpublic CDKSourceCodeWriter(Writer out)
out - The Writer to write topublic CDKSourceCodeWriter(OutputStream out)
public CDKSourceCodeWriter()
public IResourceFormat getFormat()
public void setWriter(Writer out) throws CDKException
CDKExceptionpublic void setWriter(OutputStream output) throws CDKException
CDKExceptionpublic void close()
throws IOException
IOExceptionpublic boolean accepts(Class<? extends IChemObject> classObject)
public void write(IChemObject object) throws CDKException
CDKExceptionpublic int getSupportedDataFeatures()
public int getRequiredDataFeatures()
Copyright © 2017. All rights reserved.