Class Multipart


  • public class Multipart
    extends Object
    This class is the base for implementing servlet 3.0 file upload
    Author:
    Kin-man Chung
    • Constructor Detail

      • Multipart

        public Multipart​(Request request,
                         String location,
                         long maxFileSize,
                         long maxRequestSize,
                         int fileSizeThreshold)
    • Method Detail

      • init

        public void init()
      • getLocation

        public String getLocation()
      • getFileSizeThreshold

        public int getFileSizeThreshold()
      • getMaxFileSize

        public long getMaxFileSize()
      • getMaxRequestSize

        public long getMaxRequestSize()
      • getRepository

        public File getRepository()
      • getParts

        public Collection<jakarta.servlet.http.Part> getParts()
                                                       throws IOException,
                                                              jakarta.servlet.ServletException
        Throws:
        IOException
        jakarta.servlet.ServletException
      • getPart

        public jakarta.servlet.http.Part getPart​(String name)
                                          throws IOException,
                                                 jakarta.servlet.ServletException
        Throws:
        IOException
        jakarta.servlet.ServletException
      • getProgressListener

        public ProgressListener getProgressListener()
        Returns the progress listener.
        Returns:
        The progress listener, if any, or null.
      • setProgressListener

        public void setProgressListener​(ProgressListener pListener)
        Sets the progress listener.
        Parameters:
        pListener - The progress listener, if any. Defaults to null.