Class DUUICompressionHelper

java.lang.Object
org.texttechnologylab.DockerUnifiedUIMAInterface.DUUICompressionHelper

public class DUUICompressionHelper extends Object
Helper class for compression and decompression of strings.
  • Constructor Details

    • DUUICompressionHelper

      public DUUICompressionHelper(String method)
      Constructor using a CompressorStreamFactory and a compression method.
      Parameters:
      method -
  • Method Details

    • compress

      public String compress(String input) throws IOException, org.apache.commons.compress.compressors.CompressorException
      Compresses a string.
      Parameters:
      input - The string to compress.
      Returns:
      The compressed string as a base64 encoded string.
      Throws:
      IOException
      org.apache.commons.compress.compressors.CompressorException
    • decompress

      public String decompress(String input) throws IOException, org.apache.commons.compress.compressors.CompressorException
      Decompresses a string.
      Parameters:
      input - The compressed string as a base64 encoded string.
      Returns:
      The decompressed string.
      Throws:
      IOException
      org.apache.commons.compress.compressors.CompressorException
    • getCompressionMethod

      public String getCompressionMethod()