Class MultiPartFormInputStream.MultiPart

  • All Implemented Interfaces:
    Part
    Enclosing class:
    MultiPartFormInputStream

    public class MultiPartFormInputStream.MultiPart
    extends java.lang.Object
    implements Part
    • Constructor Summary

      Constructors 
      Constructor Description
      MultiPart​(java.lang.String name, java.lang.String filename)  
    • Constructor Detail

      • MultiPart

        public MultiPart​(java.lang.String name,
                         java.lang.String filename)
    • Method Detail

      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • getContentType

        public java.lang.String getContentType()
        Specified by:
        getContentType in interface Part
      • getHeader

        public java.lang.String getHeader​(java.lang.String name)
        Specified by:
        getHeader in interface Part
      • getHeaderNames

        public java.util.Collection<java.lang.String> getHeaderNames()
        Specified by:
        getHeaderNames in interface Part
      • getHeaders

        public java.util.Collection<java.lang.String> getHeaders​(java.lang.String name)
        Specified by:
        getHeaders in interface Part
      • getInputStream

        public java.io.InputStream getInputStream()
                                           throws java.io.IOException
        Specified by:
        getInputStream in interface Part
        Throws:
        java.io.IOException
      • getSubmittedFileName

        public java.lang.String getSubmittedFileName()
        Specified by:
        getSubmittedFileName in interface Part
      • getBytes

        public byte[] getBytes()
      • getName

        public java.lang.String getName()
        Specified by:
        getName in interface Part
      • getSize

        public long getSize()
        Specified by:
        getSize in interface Part
      • write

        public void write​(java.lang.String fileName)
                   throws java.io.IOException
        Specified by:
        write in interface Part
        Throws:
        java.io.IOException
      • delete

        public void delete()
                    throws java.io.IOException
        Remove the file, whether or not Part.write() was called on it (ie no longer temporary)
        Specified by:
        delete in interface Part
        Throws:
        java.io.IOException
      • cleanUp

        public void cleanUp()
                     throws java.io.IOException
        Only remove tmp files.
        Throws:
        java.io.IOException - if unable to delete the file
      • getFile

        public java.io.File getFile()
        Get the file
        Returns:
        the file, if any, the data has been written to.
      • getContentDispositionFilename

        public java.lang.String getContentDispositionFilename()
        Get the filename from the content-disposition.
        Returns:
        null or the filename