|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectchemaxon.formats.MolConverter
public class MolConverter
Converts between molecule file formats. See supported formats and their import and/or export options on the File Formats in Marvin page.
| Constructor Summary | |
|---|---|
MolConverter(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL)
Create a MolConverter object. |
|
MolConverter(java.io.InputStream in,
java.lang.String ofname,
java.lang.String fmtopts,
boolean useSysEOL)
Use this constructor if you do not need output buffering but want to determine output file positions. |
|
MolConverter(java.util.Vector inFiles,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL)
Create a MolConverter object. |
|
MolConverter(java.util.Vector inFiles,
java.lang.String ofname,
java.lang.String fmtopts,
boolean useSysEOL)
Use this constructor if you do not need output buffering but want to determine output file positions. |
|
MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL)
Create a MolConverter object. |
|
MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL,
java.lang.String[] incFields)
Create a MolConverter object. |
|
MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL,
java.lang.String[] incFields,
java.lang.String enc)
Create a MolConverter object. |
|
MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.lang.String ofname,
java.lang.String fmtopts,
boolean useSysEOL)
Use this constructor if you do not need output buffering but want to determine output file positions. |
|
| Method Summary | |
|---|---|
void |
close()
Close the underlying RandomAccessFile. |
boolean |
convert()
Convert the next molecule. |
static MolConverter |
createMolConverter(java.io.InputStream instream,
java.io.OutputStream outstream,
java.lang.String[] args,
java.io.OutputStream[] theOut,
int[] theVerbose)
Creates a MolConverter instance with the attributes specified in the parameters. |
static boolean |
isSupportedEncoding(java.lang.String enc)
Test, whether the given charset name is supported by this JVM |
static void |
main(java.lang.String[] args)
Main method. |
static void |
mainWithoutExit(java.lang.String[] args)
Same as main(), but never calls System.exit(). |
long |
otell()
Get the current file position. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public MolConverter(java.io.InputStream in,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
in - the input molecule stream to convertout - the output streamfmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).
public MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
inFiles - input file listinOptions - import optionsout - output streamfmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).
public MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL,
java.lang.String[] incFields)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
inFiles - input file listinOptions - import optionsout - output streamfmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'incFields - included fields of an SDfile to be shown in a table
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).
public MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL,
java.lang.String[] incFields,
java.lang.String enc)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
inFiles - input file listinOptions - import optionsout - output streamfmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'incFields - included fields of an SDfile to be shown in a tableenc - the input and/or output encodings in
INCHARSET..OUTCHARSET format
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.nio.charset.IllegalCharsetNameException - if illegal input or output encoding name specified
java.nio.charset.UnsupportedCharsetException - if the specified input or output encoding is unsupported
java.lang.IllegalArgumentException - Invalid format string (fmt).
public MolConverter(java.util.Vector inFiles,
java.io.OutputStream out,
java.lang.String fmtopts,
boolean useSysEOL)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
inFiles - input file listout - output streamfmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).
public MolConverter(java.io.InputStream in,
java.lang.String ofname,
java.lang.String fmtopts,
boolean useSysEOL)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
in - the input molecule stream to convertofname - the output file namefmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).otell(),
close()
public MolConverter(java.util.Vector inFiles,
java.lang.String ofname,
java.lang.String fmtopts,
boolean useSysEOL)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
inFiles - input file listofname - output file namefmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).otell(),
close()
public MolConverter(java.util.Vector inFiles,
java.util.Vector inOptions,
java.lang.String ofname,
java.lang.String fmtopts,
boolean useSysEOL)
throws MolFormatException,
MolExportException,
java.io.IOException,
java.lang.IllegalArgumentException
inFiles - input file listinOptions - import optionsofname - output file namefmtopts - output file format with or without optionsuseSysEOL - write OS dependent line.separators instead of '\n'
MolFormatException - If the molecule file is in a
format that cannot be read
MolExportException - If the molecule cannot be exported in the
specified format
java.io.IOException - If I/O error occured when determining
the file format.
java.lang.IllegalArgumentException - Invalid format string (fmt).otell(),
close()| Method Detail |
|---|
public boolean convert()
throws MolExportException,
java.io.IOException
java.io.IOException - If an I/O error has occurred.
java.nio.charset.IllegalCharsetNameException - if the encoding is illegal
java.nio.charset.UnsupportedCharsetException - if the encoding is unsupported
MolExportException
public long otell()
throws java.io.IOException
java.io.IOException - if the position cannot be determined
public void close()
throws java.io.IOException
java.io.IOException - If an I/O error has occurred.public static boolean isSupportedEncoding(java.lang.String enc)
enc - the name of the charset
public static MolConverter createMolConverter(java.io.InputStream instream,
java.io.OutputStream outstream,
java.lang.String[] args,
java.io.OutputStream[] theOut,
int[] theVerbose)
throws java.io.IOException
instream - the input stream to take the molecule definition from.
It must be null when called for command line
usage.outstream - the output stream to write the result onto. It must be
null when called for command line usage.args - space separated options of attributes/options for the
desired MolConverter instance.
java.nio.charset.IllegalCharsetNameException - if illegal input or output encoding name specified
java.nio.charset.UnsupportedCharsetException - if the specified input or output encoding is unsupported
java.io.IOException
public static void main(java.lang.String[] args)
throws java.io.IOException
args - command line arguments
java.io.IOException
public static void mainWithoutExit(java.lang.String[] args)
throws java.io.IOException
args - arguments passed to main().
java.io.IOException
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||