Class AbstractSingleDecompress

    • Field Detail

      • DUMMY_EXTENSION

        public static final String DUMMY_EXTENSION
        the dummy extension if the file doesn't end with .gz.
        See Also:
        Constant Field Values
      • m_UseAlternativeOutputDir

        protected boolean m_UseAlternativeOutputDir
        whether to use an alternative location for the file.
      • m_AlternativeOutputDir

        protected PlaceholderDirectory m_AlternativeOutputDir
        the alternative output directory.
      • m_AlternativeFilename

        protected String m_AlternativeFilename
        the alternative filename to use.
      • m_BufferSize

        protected int m_BufferSize
        the buffer size to use.
    • Constructor Detail

      • AbstractSingleDecompress

        public AbstractSingleDecompress()
    • Method Detail

      • getDefaultExtension

        protected abstract String getDefaultExtension()
        Returns the default extension that the compressed archive has, e.g., ".gz" for gzipped files.
        Returns:
        the extension, including the dot
      • setUseAlternativeOutputDir

        public void setUseAlternativeOutputDir​(boolean value)
        Sets whether to use an alternative output directory.
        Parameters:
        value - true if an alternative output directory is used
      • getUseAlternativeOutputDir

        public boolean getUseAlternativeOutputDir()
        Returns whether to use an alternative output directory.
        Returns:
        true if an alternative output directory is used
      • useAlternativeOutputDirTipText

        public abstract String useAlternativeOutputDirTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAlternativeOutputDir

        public void setAlternativeOutputDir​(PlaceholderDirectory value)
        Sets alternative output directory to use.
        Parameters:
        value - the directory
      • getAlternativeOutputDir

        public PlaceholderDirectory getAlternativeOutputDir()
        Returns the alternative output directory to use.
        Returns:
        the directory
      • alternativeOutputDirTipText

        public String alternativeOutputDirTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setAlternativeFilename

        public void setAlternativeFilename​(String value)
        Sets alternative filename to use.
        Parameters:
        value - the filename
      • getAlternativeFilename

        public String getAlternativeFilename()
        Returns the alternative filename to use.
        Returns:
        the filename
      • alternativeFilenameTipText

        public abstract String alternativeFilenameTipText()
        Returns the tip text for this property.
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • setBufferSize

        public void setBufferSize​(int value)
        Sets the buffer size for the stream.
        Specified by:
        setBufferSize in interface BufferSupporter
        Parameters:
        value - the size in bytes
      • getBufferSize

        public int getBufferSize()
        Returns the buffer size for the stream.
        Specified by:
        getBufferSize in interface BufferSupporter
        Returns:
        the size in bytes
      • bufferSizeTipText

        public String bufferSizeTipText()
        Returns the tip text for this property.
        Specified by:
        bufferSizeTipText in interface BufferSupporter
        Returns:
        tip text for this property suitable for displaying in the GUI or for listing the options.
      • accepts

        public Class[] accepts()
        Returns the class that the consumer accepts.
        Specified by:
        accepts in interface InputConsumer
        Returns:
        the accepted input
      • generates

        public Class[] generates()
        Returns the class of objects that it generates.
        Specified by:
        generates in interface OutputProducer
        Returns:
        the generated output
      • decompress

        protected abstract String decompress​(File inFile,
                                             File outFile)
        Decompresses the archive.
        Parameters:
        inFile - the compressed archive
        outFile - the decompressed output file
        Returns:
        null if successful, otherwise error message
      • decompress

        protected abstract String decompress​(byte[] inBytes,
                                             gnu.trove.list.TByteList outBytes)
        Decompresses the bytes.
        Parameters:
        inBytes - the compressed bytes
        outBytes - the decompressed bytes
        Returns:
        null if successful, otherwise error message
      • doExecute

        protected String doExecute()
        Performs the actual transformation.
        Specified by:
        doExecute in class AbstractActor
        Returns:
        null if everything is fine, otherwise error message