Class CommonsMultipartFormDataParser

  • All Implemented Interfaces:
    MultipartFormDataParser

    public class CommonsMultipartFormDataParser
    extends java.lang.Object
    implements MultipartFormDataParser
    Multi-part form data parser that use Apache Commons FileUpload 1.4 or above.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getTempDirectoryPath()
      Returns the directory path used for temporary files.
      void parse​(RequestAdapter requestAdapter)
      Parse the given servlet request, resolving its multipart elements.
      void setAllowedFileExtensions​(java.lang.String allowedFileExtensions)
      Sets the allowed file extensions.
      void setDeniedFileExtensions​(java.lang.String deniedFileExtensions)
      Sets the denied file extensions.
      void setMaxFileSize​(long maxFileSize)
      Set the maximum allowed size (in bytes) for each individual file before an upload gets rejected.
      void setMaxInMemorySize​(int maxInMemorySize)
      Set the maximum allowed size (in bytes) before uploads are written to disk.
      void setMaxRequestSize​(long maxRequestSize)
      Sets the maximum length of HTTP GET Request -1 indicates no limit (the default).
      void setTempDirectoryPath​(java.lang.String tempDirectoryPath)
      Sets the directory path used to temporarily files.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CommonsMultipartFormDataParser

        public CommonsMultipartFormDataParser()
        Instantiates a new CommonsMultipartFormDataParser.
    • Method Detail

      • setTempDirectoryPath

        public void setTempDirectoryPath​(java.lang.String tempDirectoryPath)
        Description copied from interface: MultipartFormDataParser
        Sets the directory path used to temporarily files.
        Specified by:
        setTempDirectoryPath in interface MultipartFormDataParser
        Parameters:
        tempDirectoryPath - the directory path used for temporary files
      • setMaxRequestSize

        public void setMaxRequestSize​(long maxRequestSize)
        Description copied from interface: MultipartFormDataParser
        Sets the maximum length of HTTP GET Request -1 indicates no limit (the default).
        Specified by:
        setMaxRequestSize in interface MultipartFormDataParser
        Parameters:
        maxRequestSize - the maximum length of HTTP GET Request
        See Also:
        FileUploadBase.setSizeMax(long)
      • setMaxFileSize

        public void setMaxFileSize​(long maxFileSize)
        Description copied from interface: MultipartFormDataParser
        Set the maximum allowed size (in bytes) for each individual file before an upload gets rejected. -1 indicates no limit (the default).
        Specified by:
        setMaxFileSize in interface MultipartFormDataParser
        Parameters:
        maxFileSize - the maximum upload size per file
        See Also:
        FileUploadBase.setFileSizeMax(long)
      • setMaxInMemorySize

        public void setMaxInMemorySize​(int maxInMemorySize)
        Description copied from interface: MultipartFormDataParser
        Set the maximum allowed size (in bytes) before uploads are written to disk. Uploaded files will still be received past this amount, but they will not be stored in memory. Default is 10240, according to Commons FileUpload.
        Specified by:
        setMaxInMemorySize in interface MultipartFormDataParser
        Parameters:
        maxInMemorySize - the maximum in memory size allowed
        See Also:
        DiskFileItemFactory.setSizeThreshold(int)