public interface CompressionFormat
CompressionFormatFactory.| Modifier and Type | Method and Description |
|---|---|
org.apache.commons.compress.compressors.CompressorInputStream |
compressorInputStream(java.io.InputStream is) |
org.apache.commons.compress.compressors.CompressorOutputStream |
compressorOutputStream(java.io.OutputStream os) |
org.apache.commons.compress.compressors.CompressorOutputStream |
create(java.io.File compressedFile)
Creates a new compressed file.
|
java.lang.String |
getCompressedFileName(java.lang.String fileName)
Maps the given
fileName to the name that a corresponding compressed file would have. |
java.lang.String |
getName() |
java.lang.String |
getUncompressedFileName(java.lang.String fileName)
Maps the given
fileName to the name that a corresponding uncompressed file would have. |
boolean |
isCompressedFileName(java.lang.String fileName) |
boolean |
matches(byte[] signature,
int signatureLength) |
org.apache.commons.compress.compressors.CompressorInputStream |
open(java.io.File compressedFile)
Opens an existing compressed file for reading.
|
java.lang.String getName()
boolean isCompressedFileName(java.lang.String fileName)
fileName is typical for this CompressionFormatjava.lang.String getCompressedFileName(java.lang.String fileName)
fileName to the name that a corresponding compressed file would have. This is typically
achieved by appending a suffix, like '.bzip2', '.gz', '.Z'.java.lang.String getUncompressedFileName(java.lang.String fileName)
fileName to the name that a corresponding uncompressed file would have. This is typically
achieved by removing a suffix, like '.bzip2', '.gz', '.Z', or by changing the suffix, e.g. from '.tgz' to '.tar'.org.apache.commons.compress.compressors.CompressorInputStream compressorInputStream(java.io.InputStream is)
throws java.io.IOException
CompressorInputStream for this format which reads from the given input streamjava.io.IOExceptionorg.apache.commons.compress.compressors.CompressorInputStream open(java.io.File compressedFile)
throws java.io.IOException
CompressorInputStream for this format which reads from the given compressedFilejava.io.IOExceptionorg.apache.commons.compress.compressors.CompressorOutputStream compressorOutputStream(java.io.OutputStream os)
throws java.io.IOException,
org.apache.commons.compress.compressors.CompressorException
CompressorOutputStream for this format which writes to the given output
streamorg.apache.commons.compress.compressors.CompressorException - Creation of compressed contents in in this format is not supportedjava.io.IOExceptionorg.apache.commons.compress.compressors.CompressorOutputStream create(java.io.File compressedFile)
throws java.io.IOException,
org.apache.commons.compress.compressors.CompressorException
CompressorOutputStream for this format which writes to the given compressedFileorg.apache.commons.compress.compressors.CompressorException - Creation of compressed files in in this format is not supportedjava.io.IOExceptionboolean matches(byte[] signature,
int signatureLength)