public class FileUtil extends Object
Modifier and Type | Field and Description |
---|---|
protected static org.slf4j.Logger |
logger |
static String[] |
ZIP_MIMETYPES |
Constructor and Description |
---|
FileUtil() |
Modifier and Type | Method and Description |
---|---|
static String |
exceptionDetailMessage(Throwable t) |
static boolean |
isZipContentType(String contentType)
Check if the content type is a zip type.
|
static void |
setImportFile(FileUploadSession fileUploadSession,
InputStream is,
String name,
String mimeType) |
static String |
unZip(InputStream is,
OutputStream os)
Unzip the specified stream
|
protected static final org.slf4j.Logger logger
public static final String[] ZIP_MIMETYPES
public static boolean isZipContentType(String contentType)
contentType
- the content type to check.true
if is a zip file, false
otherwise.public static String unZip(InputStream is, OutputStream os) throws Exception
is
- the zip stream.os
- the output stream.Exception
public static void setImportFile(FileUploadSession fileUploadSession, InputStream is, String name, String mimeType) throws Exception
Exception
Copyright © 2014. All Rights Reserved.