public final class XZCompressionFormat extends java.lang.Object implements CompressionFormat
| 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.
|
static CompressionFormat |
get()
Required by
CompressionFormatFactory. |
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 |
toString() |
public static CompressionFormat get()
CompressionFormatFactory.public java.lang.String getName()
getName in interface CompressionFormatpublic boolean isCompressedFileName(java.lang.String fileName)
isCompressedFileName in interface CompressionFormatfileName is typical for this CompressionFormatpublic java.lang.String getCompressedFileName(java.lang.String fileName)
CompressionFormatfileName to the name that a corresponding compressed file would have. This is typically
achieved by appending a suffix, like '.bzip2', '.gz', '.Z'.getCompressedFileName in interface CompressionFormatpublic java.lang.String getUncompressedFileName(java.lang.String fileName)
CompressionFormatfileName 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'.getUncompressedFileName in interface CompressionFormatpublic org.apache.commons.compress.compressors.CompressorInputStream compressorInputStream(java.io.InputStream is)
throws java.io.IOException
compressorInputStream in interface CompressionFormatCompressorInputStream for this format which reads from the given input streamjava.io.IOExceptionpublic org.apache.commons.compress.compressors.CompressorInputStream open(java.io.File compressedFile)
throws java.io.IOException
CompressionFormatopen in interface CompressionFormatCompressorInputStream for this format which reads from the given compressedFilejava.io.IOExceptionpublic org.apache.commons.compress.compressors.CompressorOutputStream compressorOutputStream(java.io.OutputStream os)
throws java.io.IOException
compressorOutputStream in interface CompressionFormatCompressorOutputStream for this format which writes to the given output
streamjava.io.IOExceptionpublic org.apache.commons.compress.compressors.CompressorOutputStream create(java.io.File compressedFile)
throws java.io.IOException
CompressionFormatcreate in interface CompressionFormatCompressorOutputStream for this format which writes to the given compressedFilejava.io.IOExceptionpublic boolean matches(byte[] signature,
int signatureLength)
matches in interface CompressionFormatpublic java.lang.String toString()
toString in class java.lang.Object