Class FileItemPart

  • All Implemented Interfaces:
    javax.servlet.http.Part

    public class FileItemPart
    extends Object
    implements javax.servlet.http.Part
    A part or a form item of a multipart/form-data POST request that is based upon a FileItem.
    Since:
    8.0.0
    Author:
    XIMA MEDIA GmbH, Dresden
    • Constructor Detail

      • FileItemPart

        public FileItemPart​(org.apache.commons.fileupload.FileItem fileItem)
        Constructor for the Part.
        Parameters:
        fileItem - that the part is based on.
        Throws:
        NullPointerException - if no file Item is given.
    • Method Detail

      • getContentType

        public String getContentType()
        Specified by:
        getContentType in interface javax.servlet.http.Part
      • getName

        public String getName()
        Specified by:
        getName in interface javax.servlet.http.Part
      • getSubmittedFileName

        public String getSubmittedFileName()
        Specified by:
        getSubmittedFileName in interface javax.servlet.http.Part
      • getSize

        public long getSize()
        Specified by:
        getSize in interface javax.servlet.http.Part
      • write

        public void write​(String fileName)
                   throws IOException
        Specified by:
        write in interface javax.servlet.http.Part
        Throws:
        IOException
      • delete

        public void delete()
                    throws IOException
        Specified by:
        delete in interface javax.servlet.http.Part
        Throws:
        IOException
      • getHeader

        public String getHeader​(String name)
        Specified by:
        getHeader in interface javax.servlet.http.Part
      • getHeaders

        public Collection<String> getHeaders​(String name)
        Specified by:
        getHeaders in interface javax.servlet.http.Part
      • getHeaderNames

        public Collection<String> getHeaderNames()
        Specified by:
        getHeaderNames in interface javax.servlet.http.Part