Class MultiPartWriter

java.lang.Object
java.io.Writer
java.io.FilterWriter
org.eclipse.jetty.util.MultiPartWriter
All Implemented Interfaces:
Closeable, Flushable, Appendable, AutoCloseable

public class MultiPartWriter extends FilterWriter
Handle a multipart MIME response.
  • Field Details

  • Constructor Details

  • Method Details

    • close

      public void close() throws IOException
      End the current part.
      Specified by:
      close in interface AutoCloseable
      Specified by:
      close in interface Closeable
      Overrides:
      close in class FilterWriter
      Throws:
      IOException - IOException
    • getBoundary

      public String getBoundary()
    • startPart

      public void startPart(String contentType) throws IOException
      Start creation of the next Content.
      Parameters:
      contentType - the content type
      Throws:
      IOException - if unable to write the part
    • startPart

      public void startPart(String contentType, String[] headers) throws IOException
      Start creation of the next Content.
      Parameters:
      contentType - the content type of the part
      headers - the part headers
      Throws:
      IOException - if unable to write the part
    • endPart

      public void endPart() throws IOException
      end creation of the next Content.
      Throws:
      IOException - if unable to write the part