fr.paris.lutece.util.http
Class MultipartUtil

java.lang.Object
  extended by fr.paris.lutece.util.http.MultipartUtil

public final class MultipartUtil
extends Object

MultipartUtil


Method Summary
static MultipartHttpServletRequest convert(int nSizeThreshold, long nRequestSizeMax, boolean bActivateNormalizeFileName, javax.servlet.http.HttpServletRequest request)
          Convert a HTTP request to a MultipartHttpServletRequest
static boolean isMultipart(javax.servlet.http.HttpServletRequest request)
          Check if the given HTTP request has multipart content
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isMultipart

public static boolean isMultipart(javax.servlet.http.HttpServletRequest request)
Check if the given HTTP request has multipart content

Parameters:
request - the HTTP request
Returns:
true if it has multipart content, false otherwise

convert

public static MultipartHttpServletRequest convert(int nSizeThreshold,
                                                  long nRequestSizeMax,
                                                  boolean bActivateNormalizeFileName,
                                                  javax.servlet.http.HttpServletRequest request)
                                           throws org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException,
                                                  org.apache.commons.fileupload.FileUploadException
Convert a HTTP request to a MultipartHttpServletRequest

Parameters:
nSizeThreshold - the size threshold
nRequestSizeMax - the request size max
bActivateNormalizeFileName - true if the file name must be normalized, false otherwise
request - the HTTP request
Returns:
a MultipartHttpServletRequest, null if the request does not have a multipart content
Throws:
org.apache.commons.fileupload.FileUploadBase.SizeLimitExceededException - exception if the file size is too big
org.apache.commons.fileupload.FileUploadException - exception if an unknown error has occurred


Copyright © 2014 Mairie de Paris. All Rights Reserved.