Package chemaxon.formats
Class MolConverter.Builder
java.lang.Object
chemaxon.formats.MolConverter.Builder
- Direct Known Subclasses:
MolConverter.Options
- Enclosing class:
- MolConverter
MolConverter builder.
- Since:
- Marvin 5.2.3, 05/28/2009
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
Adds an input file.void
addInput
(InputStream is, String opts) Adds an input stream.void
Adds an input file.build()
Builds the MolConverter.clean
(int dim) Enables cleaning.Enables cleaning.void
clear()
Clears all settings.protected Object
clone()
Clones the object.int
Gets the number of input files/streams.void
setEncodings
(String enc) Sets the input and/or output encoding.void
Sets the included fields to be shown in a table.void
Sets the output file.void
setOutput
(OutputStream out, String fmtopts) Sets the output stream.void
Sets the output file.void
setOutputFlags
(int outflags) Sets output flags.
-
Constructor Details
-
Builder
public Builder()Constructs an empty Builder object.
-
-
Method Details
-
build
Builds the MolConverter.- Returns:
- the new MolConverter
- Throws:
MolFormatException
- If the molecule file is in a format that cannot be readMolExportException
- If the molecule cannot be exported in the specified formatIOException
- If I/O error occurred when determining the file format.IllegalArgumentException
- Invalid format string (fmt).
-
clear
public void clear()Clears all settings. -
addInput
Adds an input stream.- Parameters:
is
- the input streamopts
- import options ornull
-
addInput
Adds an input file.- Parameters:
f
- the fileopts
- import options ornull
-
addInput
Adds an input file.- Parameters:
fname
- the file's pathopts
- import options ornull
-
getInputCount
public int getInputCount()Gets the number of input files/streams.- Returns:
- the number of input files/streams
-
setOutput
Sets the output stream.- Parameters:
out
- the output streamfmtopts
- file format and options (ornull
)
-
setOutput
Sets the output file.- Parameters:
f
- the output filefmtopts
- file format and options (ornull
)
-
setOutput
Sets the output file.- Parameters:
fname
- the output file's pathfmtopts
- file format and options (ornull
)
-
setOutputFlags
public void setOutputFlags(int outflags) Sets output flags.- Parameters:
outflags
- output flags, a combination ofMolExporter.TEXT
andMolExporter.MULTIPLE
-
setEncodings
Sets the input and/or output encoding.- Parameters:
enc
- the input and/or output encodings in INCHARSET..OUTCHARSET format
-
setFields
Sets the included fields to be shown in a table.- Parameters:
fields
- the fields
-
clean
Enables cleaning.- Parameters:
dim
- cleaning dimension, 2 or 3- Returns:
- this builder object
- Since:
- Marvin 5.2.4, 07/07/2009
-
clean
Enables cleaning.- Parameters:
dim
- cleaning dimension, 2 or 3opts
- cleaning options- Returns:
- this builder object
- Since:
- Marvin 5.2.4, 07/07/2009
-
clone
Clones the object.
-