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 SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidAdds an input file.voidaddInput(InputStream is, String opts) Adds an input stream.voidAdds an input file.build()Builds the MolConverter.clean(int dim) Enables cleaning.Enables cleaning.voidclear()Clears all settings.protected Objectclone()Clones the object.intGets the number of input files/streams.voidsetEncodings(String enc) Sets the input and/or output encoding.voidSets the included fields to be shown in a table.voidSets the output file.voidsetOutput(OutputStream out, String fmtopts) Sets the output stream.voidSets the output file.voidsetOutputFlags(int outflags) Sets output flags.
- 
Constructor Details- 
Builderpublic Builder()Constructs an empty Builder object.
 
- 
- 
Method Details- 
buildBuilds the MolConverter.- Returns:
- the new MolConverter
- Throws:
- MolFormatException- If the molecule file is in a format that cannot be read
- MolExportException- If the molecule cannot be exported in the specified format
- IOException- If I/O error occurred when determining the file format.
- IllegalArgumentException- Invalid format string (fmt).
 
- 
clearpublic void clear()Clears all settings.
- 
addInputAdds an input stream.- Parameters:
- is- the input stream
- opts- import options or- null
 
- 
addInputAdds an input file.- Parameters:
- f- the file
- opts- import options or- null
 
- 
addInputAdds an input file.- Parameters:
- fname- the file's path
- opts- import options or- null
 
- 
getInputCountpublic int getInputCount()Gets the number of input files/streams.- Returns:
- the number of input files/streams
 
- 
setOutputSets the output stream.- Parameters:
- out- the output stream
- fmtopts- file format and options (or- null)
 
- 
setOutputSets the output file.- Parameters:
- f- the output file
- fmtopts- file format and options (or- null)
 
- 
setOutputSets the output file.- Parameters:
- fname- the output file's path
- fmtopts- file format and options (or- null)
 
- 
setOutputFlagspublic void setOutputFlags(int outflags) Sets output flags.- Parameters:
- outflags- output flags, a combination of- MolExporter.TEXTand- MolExporter.MULTIPLE
 
- 
setEncodingsSets the input and/or output encoding.- Parameters:
- enc- the input and/or output encodings in INCHARSET..OUTCHARSET format
 
- 
setFieldsSets the included fields to be shown in a table.- Parameters:
- fields- the fields
 
- 
cleanEnables cleaning.- Parameters:
- dim- cleaning dimension, 2 or 3
- Returns:
- this builder object
- Since:
- Marvin 5.2.4, 07/07/2009
 
- 
cleanEnables cleaning.- Parameters:
- dim- cleaning dimension, 2 or 3
- opts- cleaning options
- Returns:
- this builder object
- Since:
- Marvin 5.2.4, 07/07/2009
 
- 
cloneClones the object.
 
-