public class ZipManagement extends Object
| Modifier and Type | Field and Description |
|---|---|
protected static Logger |
logger
create a static logger.
|
| Constructor and Description |
|---|
ZipManagement() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addFileInZip(ZipOutputStream out,
String fileName,
InputStream in) |
static void |
gzipFile(File outFilename,
File inFile) |
static File |
saveFile(javax.servlet.ServletContext serveltContext,
String dir,
String fileName,
InputStream in) |
static void |
uploadZipFile(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
InputStream in) |
static void |
uploadZipTemplate(ContentContext ctx,
InputStream in,
String templateId) |
static void |
zipDirectory(ZipOutputStream out,
String targetDir,
String sourceDir,
javax.servlet.http.HttpServletRequest request) |
static void |
zipDirectory(ZipOutputStream out,
String targetDir,
String sourceDir,
javax.servlet.http.HttpServletRequest request,
Set<String> excludes,
Set<String> includes) |
static void |
zipFile(File zipFile,
File inFile) |
static void |
zipFile(File zipFile,
File inFile,
File refDir) |
static void |
zipFile(ZipOutputStream out,
File inFile,
File refDir) |
protected static Logger logger
public static void zipDirectory(ZipOutputStream out, String targetDir, String sourceDir, javax.servlet.http.HttpServletRequest request) throws IOException
IOExceptionpublic static void zipDirectory(ZipOutputStream out, String targetDir, String sourceDir, javax.servlet.http.HttpServletRequest request, Set<String> excludes, Set<String> includes) throws IOException
IOExceptionpublic static void zipFile(File zipFile, File inFile) throws IOException
IOExceptionpublic static void zipFile(File zipFile, File inFile, File refDir) throws IOException
IOExceptionpublic static void gzipFile(File outFilename, File inFile) throws IOException
IOExceptionpublic static void zipFile(ZipOutputStream out, File inFile, File refDir) throws IOException
IOExceptionpublic static void addFileInZip(ZipOutputStream out, String fileName, InputStream in) throws IOException
IOExceptionpublic static File saveFile(javax.servlet.ServletContext serveltContext, String dir, String fileName, InputStream in) throws IOException
IOExceptionpublic static void uploadZipFile(javax.servlet.http.HttpServletRequest request,
javax.servlet.http.HttpServletResponse response,
InputStream in)
throws Exception
Exceptionpublic static void uploadZipTemplate(ContentContext ctx, InputStream in, String templateId) throws Exception
ExceptionCopyright © 2012-2018. All Rights Reserved.