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 File |
setImportFile(InputStream is,
String tempName,
String extention,
String name,
String mimeType) |
static void |
setImportFileCodelistMapping(CodelistMappingFileUploadSession fileUploadSession,
InputStream is,
String name,
String mimeType) |
static void |
setImportFileCSV(CSVFileUploadSession 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.Exceptionpublic static void setImportFileCSV(CSVFileUploadSession fileUploadSession, InputStream is, String name, String mimeType) throws Exception
Exceptionpublic static void setImportFileCodelistMapping(CodelistMappingFileUploadSession fileUploadSession, InputStream is, String name, String mimeType) throws Exception
ExceptionCopyright © 2016. All Rights Reserved.