@PublicAPI public class MdlCompressor extends java.lang.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(java.io.InputStream in,
java.io.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 java.lang.String |
convert(java.lang.String mol,
int flags)
(Un)compress the specified molfile or SDfile.
|
static void |
main(java.lang.String[] args)
Main program.
|
public static int DECOMPRESS
public static int COMPRESS
public static int SDF
@Deprecated public static int TEXTMODE
public MdlCompressor(java.io.InputStream in, java.io.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 java.io.IOException
java.io.IOException
public static byte[] convert(byte[] mol, int flags) throws java.io.IOException
mol
- the input molfile or SDfileflags
- compression or decompression, binary or text modeMolFormatException
- if the input is in bad formatjava.io.IOException
- if the input file is ended unexpectedlyDECOMPRESS
,
COMPRESS
public static java.lang.String convert(java.lang.String mol, int flags) throws java.io.IOException
mol
- the input molfile or SDfileflags
- compression or decompression, binary or text modeMolFormatException
- if the input is in bad formatjava.io.IOException
- if the input file is ended unexpectedlyDECOMPRESS
,
COMPRESS
public static void main(java.lang.String[] args)