Class CompressionUtilities.CompressedFileWrapper

  • Enclosing class:
    CompressionUtilities

    public static class CompressionUtilities.CompressedFileWrapper
    extends java.lang.Object
    A wrapper class for a compressed file. Provides methods to read the uncompressed content from the file.
    • Method Detail

      • getFile

        public java.io.File getFile()
        Returns:
        The compressed file
      • getUncompressedInputStream

        public java.io.InputStream getUncompressedInputStream​(jebl.util.ProgressListener progressListener)
                                                       throws java.io.IOException
        Parameters:
        progressListener - to report progress of reading the stream to
        Returns:
        An uncompressed InputStream to the file.
        Throws:
        java.io.IOException - if there is a problem creating the stream.
      • getFirstUncompressedCharacters

        public java.lang.String getFirstUncompressedCharacters​(int maximumBytesToRead)
                                                        throws java.io.IOException
        Gets the first uncompressed characters of the file. If the file contains fewer characters than the requested number then the result will only contain the characters that existed in the file.
        Parameters:
        maximumBytesToRead - The number of characters to read.
        Returns:
        A String containing the first uncompressed characters.
        Throws:
        java.io.IOException - if there is a problem reading from the file.