public class GzUtils extends Object
Modifier and Type | Field and Description |
---|---|
static int |
BUFFER_LENGTH
The length of the character buffer to use.
|
static String |
GZ_EXTENSION
The extension to use for gz files.
|
Constructor and Description |
---|
GzUtils() |
Modifier and Type | Method and Description |
---|---|
static void |
gunzipFile(File gzFile,
boolean remove)
Uncompresses the given gz file to the given destination file.
|
static void |
gunzipFile(File gzFile,
File destinationFile,
boolean remove)
Uncompresses the given gz file to the given destination file.
|
static void |
gzFile(File file,
boolean remove)
Gzip a file.If the gz file already exists it will be silently
overwritten.
|
static void |
gzFile(File file,
File gzFile,
boolean remove)
Gzip a file.If the gz file already exists it will be silently
overwritten.
|
public static final int BUFFER_LENGTH
public static final String GZ_EXTENSION
public static void gzFile(File file, boolean remove)
file
- the file to readremove
- if true the original file will be removedpublic static void gzFile(File file, File gzFile, boolean remove)
file
- the file to readgzFile
- the gz file to writeremove
- if true the original file will be removedpublic static void gunzipFile(File gzFile, boolean remove)
gzFile
- the gz file to readremove
- if true the gz file will be deleted upon completionpublic static void gunzipFile(File gzFile, File destinationFile, boolean remove)
gzFile
- the gz file to readdestinationFile
- the file to writeremove
- if true the gz file will be deleted upon completionCopyright © 2021. All rights reserved.