public class Zipper extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
Zipper.Z |
| Constructor and Description |
|---|
Zipper() |
| Modifier and Type | Method and Description |
|---|---|
static Zipper.Z |
build()
zip helper
|
static Map<String,byte[]> |
unzip(InputStream zip)
unzip zip file to map
|
static Map<String,byte[]> |
unzip(InputStream zip,
String... lowercaseExtName)
flat all zip file (unzip recursively, zip in zip)
|
static void |
unzip(InputStream zip,
String path)
unzip zip file to some path
|
static void |
unzip(String zip,
String path)
unzip zip file to some path
|
static byte[] |
zip(List<File> files)
zip files to byte array
|
static byte[] |
zip(Map<String,InputStream> files)
zip files to byte array
|
static void |
zip(OutputStream out,
List<File> files)
zip files to stream
|
static void |
zip(OutputStream out,
Map<String,InputStream> files)
zip files to stream
|
static void |
zip(String zip,
List<File> files)
zip files to target file
|
static void |
zip(String zip,
Map<String,InputStream> files)
zip files to target file
|
public static byte[] zip(List<File> files) throws IOException
files - source filesIOException - exceptionpublic static void zip(String zip, List<File> files) throws IOException
zip - the target file, eg. a/b/c.zipfiles - source filesIOException - exceptionpublic static void zip(OutputStream out, List<File> files) throws IOException
out - the streamfiles - source filesIOException - exceptionpublic static byte[] zip(Map<String,InputStream> files) throws IOException
files - source files with key-streamIOException - exceptionpublic static void zip(String zip, Map<String,InputStream> files) throws IOException
zip - the target file, eg. a/b/c.zipfiles - source filesIOException - exceptionpublic static void zip(OutputStream out, Map<String,InputStream> files) throws IOException
out - the streamfiles - source files with key-streamIOException - exceptionpublic static void unzip(String zip, String path) throws IOException
zip - zip filepath - target pathIOException - exceptionpublic static void unzip(InputStream zip, String path) throws IOException
zip - zip filepath - target pathIOException - exceptionpublic static Map<String,byte[]> unzip(InputStream zip) throws IOException
zip - zip fileIOException - exceptionpublic static Map<String,byte[]> unzip(InputStream zip, String... lowercaseExtName) throws IOException
zip - zip filelowercaseExtName - "zip","jar","war"IOException - exceptionpublic static Zipper.Z build()
Copyright © 2024. All rights reserved.