Class CompressionUtilities.CompressedFileWrapper
- java.lang.Object
-
- com.biomatters.geneious.publicapi.utilities.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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.io.File
getFile()
java.lang.String
getFirstUncompressedCharacters(int maximumBytesToRead)
Gets the first uncompressed characters of the file.CompressionUtilities.CompressionMethod
getMethod()
java.io.InputStream
getUncompressedInputStream(jebl.util.ProgressListener progressListener)
-
-
-
Method Detail
-
getFile
public java.io.File getFile()
- Returns:
- The compressed file
-
getMethod
public CompressionUtilities.CompressionMethod getMethod()
- Returns:
- The method of compression used to create the 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.
-
-