public class MdlCompressor extends Object
Modifier and Type | Field and Description |
---|---|
static int |
COMPRESS
Compression flag.
|
static int |
DECOMPRESS
Decompression.
|
static int |
SDF |
static int |
TEXTMODE
Deprecated.
as of Marvin 3.1, there is no possibility to do that
|
Constructor and Description |
---|
MdlCompressor(InputStream in,
OutputStream out,
int flags)
Create a(n un)compressor for the specified input and output streams.
|
Modifier and Type | Method and Description |
---|---|
boolean |
convert()
Compression/decompression
|
static byte[] |
convert(byte[] mol,
int flags)
(Un)compress the specified molfile or SDfile.
|
static String |
convert(String mol,
int flags)
(Un)compress the specified molfile or SDfile.
|
static void |
main(String[] args)
Main program.
|
public static int DECOMPRESS
public static int COMPRESS
public static int SDF
@Deprecated public static int TEXTMODE
public MdlCompressor(InputStream in, OutputStream out, int flags)
in
- the input molecule streamout
- the output molecule streamflags
- compression or decompression, binary or text modeDECOMPRESS
,
COMPRESS
public boolean convert() throws IOException
IOException
public static byte[] convert(byte[] mol, int flags) throws IOException
mol
- the input molfile or SDfileflags
- compression or decompression, binary or text modeMolFormatException
- if the input is in bad formatIOException
- if the input file is ended unexpectedlyDECOMPRESS
,
COMPRESS
public static String convert(String mol, int flags) throws IOException
mol
- the input molfile or SDfileflags
- compression or decompression, binary or text modeMolFormatException
- if the input is in bad formatIOException
- if the input file is ended unexpectedlyDECOMPRESS
,
COMPRESS
public static void main(String[] args)