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
IOException
public static void zipDirectory(ZipOutputStream out, String targetDir, String sourceDir, javax.servlet.http.HttpServletRequest request, Set<String> excludes, Set<String> includes) throws IOException
IOException
public static void zipFile(File zipFile, File inFile) throws IOException
IOException
public static void zipFile(File zipFile, File inFile, File refDir) throws IOException
IOException
public static void gzipFile(File outFilename, File inFile) throws IOException
IOException
public static void zipFile(ZipOutputStream out, File inFile, File refDir) throws IOException
IOException
public static void addFileInZip(ZipOutputStream out, String fileName, InputStream in) throws IOException
IOException
public static File saveFile(javax.servlet.ServletContext serveltContext, String dir, String fileName, InputStream in) throws IOException
IOException
public static void uploadZipFile(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, InputStream in) throws Exception
Exception
public static void uploadZipTemplate(ContentContext ctx, InputStream in, String templateId) throws Exception
Exception
Copyright © 2012-2018. All Rights Reserved.