Class MdlCompressor

java.lang.Object
chemaxon.formats.MdlCompressor

@PublicAPI public class MdlCompressor extends Object
Molfile compression.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Compression flag.
    static final int
    Decompression.
    static final int
     
    static final int
    Deprecated, for removal: This API element is subject to removal in a future version.
    as of Marvin 3.1, there is no possibility to do that
  • Constructor Summary

    Constructors
    Constructor
    Description
    MdlCompressor(InputStream in, OutputStream out, int flags)
    Create a(n un)compressor for the specified input and output streams.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    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.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • MdlCompressor

      public MdlCompressor(InputStream in, OutputStream out, int flags)
      Create a(n un)compressor for the specified input and output streams.
      Parameters:
      in - the input molecule stream
      out - the output molecule stream
      flags - compression or decompression, binary or text mode
      See Also:
  • Method Details

    • convert

      public boolean convert() throws IOException
      Compression/decompression
      Throws:
      IOException
    • convert

      public static byte[] convert(byte[] mol, int flags) throws IOException
      (Un)compress the specified molfile or SDfile.
      Parameters:
      mol - the input molfile or SDfile
      flags - compression or decompression, binary or text mode
      Returns:
      the (un)compressed molfile or SDfile
      Throws:
      MolFormatException - if the input is in bad format
      IOException - if the input file is ended unexpectedly
      See Also:
    • convert

      public static String convert(String mol, int flags) throws IOException
      (Un)compress the specified molfile or SDfile.
      Parameters:
      mol - the input molfile or SDfile
      flags - compression or decompression, binary or text mode
      Returns:
      the (un)compressed molfile or SDfile
      Throws:
      MolFormatException - if the input is in bad format
      IOException - if the input file is ended unexpectedly
      See Also:
    • main

      public static void main(String[] args)
      Main program. Usage: java chemaxon.formats.MdlCompressor command molfile. Compression: command=c, decompression: command=d.