public class ApexGzipHelper extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static org.slf4j.Logger |
LOGGER |
| Modifier | Constructor and Description |
|---|---|
protected |
ApexGzipHelper() |
| Modifier and Type | Method and Description |
|---|---|
static byte[] |
compress(String someString)
Deprecated.
Prefer .deflate
|
static byte[] |
deflate(String someString) |
static String |
inflate(byte[] inflated) |
static String |
inflate(byte[] inflated,
Charset charset) |
static boolean |
isGZIPStream(byte[] bytes) |
static void |
packToGzip(File inputPath,
File zipFilePath)
Gzip enable compressing a single file
|
static void |
packToZip(File folder,
File zipFilePath) |
static String |
toStringCompressed(byte[] bytes) |
static String |
toStringOptCompressed(byte[] bytes)
This is able to handle byte arrays, would it hold the compressed String, or just plain data
|
public static boolean isGZIPStream(byte[] bytes)
bytes - public static String toStringOptCompressed(byte[] bytes) throws IOException
bytes - IOExceptionpublic static String toStringCompressed(byte[] bytes) throws IOException
IOException@Deprecated public static byte[] compress(String someString) throws IOException
IOExceptionpublic static byte[] deflate(String someString) throws IOException
IOExceptionpublic static String inflate(byte[] inflated) throws IOException
IOExceptionpublic static String inflate(byte[] inflated, Charset charset) throws IOException
IOExceptionpublic static void packToZip(File folder, File zipFilePath) throws IOException
folder - a file-system folder were to read files and folderszipFilePath - a file-system path where to create a new archiveIOExceptionpublic static void packToGzip(File inputPath, File zipFilePath) throws IOException
inputPath - zipFilePath - IOExceptionCopyright © 2014–2017 Pivotal Software, Inc.. All rights reserved.