public class XZUtils
extends java.lang.Object
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
getCompressedFilename(java.lang.String fileName)
Deprecated.
|
static java.lang.String |
getCompressedFileName(java.lang.String fileName)
Maps the given file name to the name that the file should have after compression with xz.
|
static java.lang.String |
getUncompressedFilename(java.lang.String fileName)
Deprecated.
|
static java.lang.String |
getUncompressedFileName(java.lang.String fileName)
Maps the given name of a xz-compressed file to the name that the file should have after uncompression.
|
static boolean |
isCompressedFilename(java.lang.String fileName)
Deprecated.
|
static boolean |
isCompressedFileName(java.lang.String fileName)
Detects common xz suffixes in the given file name.
|
static boolean |
isXZCompressionAvailable()
Are the classes required to support XZ compression available?
|
static boolean |
matches(byte[] signature,
int length)
Checks if the signature matches what is expected for a .xz file.
|
static void |
setCacheXZAvailablity(boolean doCache)
Whether to cache the result of the XZ for Java check.
|
@Deprecated public static java.lang.String getCompressedFilename(java.lang.String fileName)
getCompressedFileName(String).fileName - name of a filepublic static java.lang.String getCompressedFileName(java.lang.String fileName)
fileName - name of a file@Deprecated public static java.lang.String getUncompressedFilename(java.lang.String fileName)
getUncompressedFileName(String).fileName - name of a filepublic static java.lang.String getUncompressedFileName(java.lang.String fileName)
fileName - name of a file@Deprecated public static boolean isCompressedFilename(java.lang.String fileName)
isCompressedFileName(String).fileName - name of a filetrue if the file name has a common xz suffix, false otherwisepublic static boolean isCompressedFileName(java.lang.String fileName)
fileName - name of a filetrue if the file name has a common xz suffix, false otherwisepublic static boolean isXZCompressionAvailable()
public static boolean matches(byte[] signature,
int length)
This is more or less a copy of the version found in XZCompressorInputStream but doesn't depend on the presence of XZ for Java.
signature - the bytes to checklength - the number of bytes to checkpublic static void setCacheXZAvailablity(boolean doCache)
This defaults to false in an OSGi environment and true otherwise.
doCache - whether to cache the resultCopyright © 2010 - 2024 Adobe. All Rights Reserved