public class SDFWriter extends DefaultChemObjectWriter
| Modifier and Type | Field and Description |
|---|---|
static String |
OptAlwaysV3000 |
static String |
OptTruncateLongData |
static String |
OptWriteData |
| Constructor and Description |
|---|
SDFWriter() |
SDFWriter(BufferedWriter wtr)
Create an SDfile writer that will output directly to the provided buffered writer.
|
SDFWriter(OutputStream output)
Create an SDfile writer, the provided output stream is wrapped
in a UTF-8 buffered writer.
|
SDFWriter(OutputStream output,
Set<String> propertiesToWrite)
Constructs a new SdfWriter that can write to a given
OutputStream. |
SDFWriter(Set<String> propertiesToWrite)
Writes SD-File to a String including the given properties
|
SDFWriter(Writer wtr)
Create an SDfile writer, the provided writer is buffered
if it's not an instance of BufferedWriter.
|
SDFWriter(Writer out,
Set<String> propertiesToWrite)
Constructs a new SDFWriter that writes to the given
Writer. |
| Modifier and Type | Method and Description |
|---|---|
boolean |
accepts(Class<? extends IChemObject> classObject)
Returns whether the given
IChemObject can be read or written. |
void |
close()
Flushes the output and closes this object.
|
void |
customizeJob() |
IResourceFormat |
getFormat()
Returns the
IResourceFormat class for this IO class. |
void |
setAlwaysV3000(boolean val) |
void |
setWriter(OutputStream output)
Sets the OutputStream from which this ChemObjectWriter should write
the contents.
|
void |
setWriter(Writer out)
Sets the Writer from which this ChemObjectWriter should write
the contents.
|
void |
write(IChemObject object)
Writes a IChemObject to the MDL SD file formated output.
|
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 static final String OptAlwaysV3000
public static final String OptWriteData
public static final String OptTruncateLongData
public SDFWriter(BufferedWriter wtr)
wtr - writerpublic SDFWriter(Writer wtr)
BufferedWriter.wtr - writerpublic SDFWriter(OutputStream output)
output - out streampublic SDFWriter()
public SDFWriter(Writer out, Set<String> propertiesToWrite)
Writer.out - The Writer to write topublic SDFWriter(OutputStream output, Set<String> propertiesToWrite)
OutputStream.output - The OutputStream to write topublic IResourceFormat getFormat()
IChemObjectIOIResourceFormat class for this IO class.public void setWriter(Writer out) throws CDKException
IChemObjectWriterCDKExceptionpublic void setWriter(OutputStream output) throws CDKException
IChemObjectWriterCDKExceptionpublic void close()
throws IOException
IOException - when the wrapper IO class cannot be closed.public boolean accepts(Class<? extends IChemObject> classObject)
IChemObjectIOIChemObject can be read or written.classObject - IChemObject of which is tested if it can be handled.IChemObject can be handled.public void write(IChemObject object) throws CDKException
IChemFile, IAtomContainerSet
and IAtomContainerSet.object - an acceptable IChemObjectCDKException - is thrown if the output
does not support the data in the objectaccepts(Class)public void setAlwaysV3000(boolean val)
public void customizeJob()
Copyright © 2021. All rights reserved.