Class MultiPartInputStreamParser.MultiPart

java.lang.Object
org.eclipse.jetty.server.MultiPartInputStreamParser.MultiPart
All Implemented Interfaces:
jakarta.servlet.http.Part
Enclosing class:
MultiPartInputStreamParser

public class MultiPartInputStreamParser.MultiPart extends Object implements jakarta.servlet.http.Part
  • Field Details

  • Constructor Details

  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • setContentType

      protected void setContentType(String contentType)
    • open

      protected void open() throws IOException
      Throws:
      IOException
    • close

      protected void close() throws IOException
      Throws:
      IOException
    • write

      protected void write(int b) throws IOException
      Throws:
      IOException
    • write

      protected void write(byte[] bytes, int offset, int length) throws IOException
      Throws:
      IOException
    • createFile

      protected void createFile() throws IOException
      Throws:
      IOException
    • setHeaders

      protected void setHeaders(MultiMap<String> headers)
    • getContentType

      public String getContentType()
      Specified by:
      getContentType in interface jakarta.servlet.http.Part
      See Also:
      • Part.getContentType()
    • getHeader

      public String getHeader(String name)
      Specified by:
      getHeader in interface jakarta.servlet.http.Part
      See Also:
      • Part.getHeader(String)
    • getHeaderNames

      public Collection<String> getHeaderNames()
      Specified by:
      getHeaderNames in interface jakarta.servlet.http.Part
      See Also:
      • Part.getHeaderNames()
    • getHeaders

      public Collection<String> getHeaders(String name)
      Specified by:
      getHeaders in interface jakarta.servlet.http.Part
      See Also:
      • Part.getHeaders(String)
    • getInputStream

      public InputStream getInputStream() throws IOException
      Specified by:
      getInputStream in interface jakarta.servlet.http.Part
      Throws:
      IOException
      See Also:
      • Part.getInputStream()
    • getSubmittedFileName

      public String getSubmittedFileName()
      Specified by:
      getSubmittedFileName in interface jakarta.servlet.http.Part
      See Also:
      • Part.getSubmittedFileName()
    • getBytes

      public byte[] getBytes()
    • getName

      public String getName()
      Specified by:
      getName in interface jakarta.servlet.http.Part
      See Also:
      • Part.getName()
    • getSize

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

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

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

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

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

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