org.eclipse.jetty.util

## 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 Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `MULTIPART_MIXED`
    `static String` | `MULTIPART_X_MIXED_REPLACE`

    - ### Fields inherited from class java.io.FilterWriter

      `out`

    - ### Fields inherited from class java.io.Writer

      `lock`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultiPartWriter(Writer out)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `close()` End the current part.
    `void` | `endPart()` end creation of the next Content.
    `String` | `getBoundary()`
    `void` | `startPart(String contentType)` Start creation of the next Content.
    `void` | `startPart(String contentType, String[] headers)` Start creation of the next Content.

    - ### Methods inherited from class java.io.FilterWriter

      `flush, write, write, write`

    - ### Methods inherited from class java.io.Writer

      `append, append, append, write, write`

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### MULTIPART_MIXED

          public static String MULTIPART_MIXED

    - #### MULTIPART_X_MIXED_REPLACE

          public static String MULTIPART_X_MIXED_REPLACE

  - ### Constructor Detail

    - #### MultiPartWriter

          public MultiPartWriter(Writer out)
                          throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### close

          public void close()
                     throws IOException

      End the current part.
      Specified by:
        `close` in interface `Closeable`
      Specified by:
        `close` in interface `AutoCloseable`
      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.
      Throws:
        `IOException`

    - #### endPart

          public void endPart()
                       throws IOException

      end creation of the next Content.
      Throws:
        `IOException`

    - #### startPart

          public void startPart(String contentType,
                       String[] headers)
                         throws IOException

      Start creation of the next Content.
      Throws:
        `IOException`

Copyright © 1995-2015 Mort Bay Consulting. All Rights Reserved.