org.gcube.portlets.user.td.gwtservice.server.file
Class FileUtil
java.lang.Object
org.gcube.portlets.user.td.gwtservice.server.file.FileUtil
public class FileUtil
- extends Object
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
logger
protected static final org.slf4j.Logger logger
ZIP_MIMETYPES
public static final String[] ZIP_MIMETYPES
FileUtil
public FileUtil()
isZipContentType
public static boolean isZipContentType(String contentType)
- Check if the content type is a zip type.
- Parameters:
contentType - the content type to check.
- Returns:
true if is a zip file, false otherwise.
unZip
public static String unZip(InputStream is,
OutputStream os)
throws Exception
- Unzip the specified stream
- Parameters:
is - the zip stream.os - the output stream.
- Throws:
Exception
exceptionDetailMessage
public static String exceptionDetailMessage(Throwable t)
setImportFile
public static void setImportFile(FileUploadSession fileUploadSession,
InputStream is,
String name,
String mimeType)
throws Exception
- Throws:
Exception
Copyright © 2013. All Rights Reserved.