|
String | rootFolder |
|
Map< String, String > | fileListing |
|
Data compression utility class.
- Author
- Maciej Szewczykowski | macie.nosp@m.j@ba.nosp@m.ltrad.nosp@m..eu
- Version
- 1.7.0
- Since
- 1.7.0
◆ CompressDataUtil() [1/2]
eu.baltrad.dex.util.CompressDataUtil.CompressDataUtil |
( |
| ) |
|
|
inline |
◆ CompressDataUtil() [2/2]
eu.baltrad.dex.util.CompressDataUtil.CompressDataUtil |
( |
String | rootFolder | ) |
|
|
inline |
◆ fileToByteArray()
byte[] eu.baltrad.dex.util.CompressDataUtil.fileToByteArray |
( |
String | fileName | ) |
throws RuntimeException |
|
inlineprotected |
Read file to byte array.
- Parameters
-
- Returns
- File content as byte array
- Exceptions
-
◆ getZipEntry()
String eu.baltrad.dex.util.CompressDataUtil.getZipEntry |
( |
String | file | ) |
|
|
inlineprotected |
Get file's path relative to root directory.
- Parameters
-
- Returns
- Relative file's path
◆ listFiles()
void eu.baltrad.dex.util.CompressDataUtil.listFiles |
( |
File | node | ) |
|
|
inlineprotected |
List files recursively.
- Parameters
-
◆ unzip() [1/2]
byte[] eu.baltrad.dex.util.CompressDataUtil.unzip |
( |
InputStream | is | ) |
throws RuntimeException |
|
inline |
Extract files from ZIP archive and write to output stream.
- Parameters
-
is | Compressed input stream |
- Returns
- Uncompressed byte array
- Exceptions
-
◆ unzip() [2/2]
void eu.baltrad.dex.util.CompressDataUtil.unzip |
( |
String | folder, |
|
|
byte[] | bytes ) throws RuntimeException |
|
inline |
Extract files from ZIP archive and save to file.
- Parameters
-
folder | Root folder |
is | Compressed input stream |
- Exceptions
-
◆ zip()
byte[] eu.baltrad.dex.util.CompressDataUtil.zip |
( |
| ) |
throws RuntimeException |
|
inline |
Create ZIP archive.
- Returns
- ZIP archive as byte array
- Exceptions
-
The documentation for this class was generated from the following file:
- src/java/eu/baltrad/dex/util/CompressDataUtil.java