org.jboss.resteasy.plugins.providers.multipart

## Class MultipartInputImpl

- java.lang.Object
- - org.jboss.resteasy.plugins.providers.multipart.MultipartInputImpl

- All Implemented Interfaces:
    MultipartInput
  Direct Known Subclasses:
    MultipartFormDataInputImpl, MultipartRelatedInputImpl

      public class MultipartInputImpl
      extends Object
      implements MultipartInput

  Version:
    $Revision: 1 $
  Author:
    Bill Burke

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `class` | `MultipartInputImpl.PartImpl`

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected MediaType` | `contentType`
    `protected String` | `defaultPartCharset`
    `protected MediaType` | `defaultPartContentType`
    `protected static Annotation[]` | `empty`
    `protected org.apache.james.mime4j.message.Message` | `mimeMessage`
    `protected List<InputPart>` | `parts`
    `protected Providers` | `workers`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `MultipartInputImpl(MediaType contentType, Providers workers)`
    `MultipartInputImpl(MediaType contentType, Providers workers, MediaType defaultPartContentType, String defaultPartCharset)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `protected InputStream` | `addHeaderToHeadlessStream(InputStream is)`
    `void` | `close()` Call this method to delete any temporary files created from unmarshalling this multipart message Otherwise they will be deleted on Garbage Collection or JVM exit.
    `protected InputStream` | `createHeaderInputStream()`
    `protected InputPart` | `extractPart(org.apache.james.mime4j.message.BodyPart bodyPart)`
    `protected void` | `extractParts()`
    `protected void` | `finalize()`
    `protected String` | `getCharset(MediaType mediaType)`
    `List<InputPart>` | `getParts()`
    `String` | `getPreamble()`
    `static void` | `main(String[] args)`
    `void` | `parse(InputStream is)`

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

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

- - ### Field Detail

    - #### contentType

          protected MediaType contentType

    - #### workers

          protected Providers workers

    - #### mimeMessage

          protected org.apache.james.mime4j.message.Message mimeMessage

    - #### parts

          protected List<InputPart> parts

    - #### empty

          protected static final Annotation[] empty

    - #### defaultPartContentType

          protected MediaType defaultPartContentType

    - #### defaultPartCharset

          protected String defaultPartCharset

  - ### Constructor Detail

    - #### MultipartInputImpl

          public MultipartInputImpl(MediaType contentType,
                            Providers workers)

    - #### MultipartInputImpl

          public MultipartInputImpl(MediaType contentType,
                            Providers workers,
                            MediaType defaultPartContentType,
                            String defaultPartCharset)

  - ### Method Detail

    - #### parse

          public void parse(InputStream is)
                     throws IOException

      Throws:
        `IOException`

    - #### addHeaderToHeadlessStream

          protected InputStream addHeaderToHeadlessStream(InputStream is)
                                                   throws UnsupportedEncodingException

      Throws:
        `UnsupportedEncodingException`

    - #### createHeaderInputStream

          protected InputStream createHeaderInputStream()
                                                 throws UnsupportedEncodingException

      Throws:
        `UnsupportedEncodingException`

    - #### getPreamble

          public String getPreamble()

      Specified by:
        `getPreamble` in interface `MultipartInput`

    - #### getParts

          public List<InputPart> getParts()

      Specified by:
        `getParts` in interface `MultipartInput`

    - #### extractParts

          protected void extractParts()
                               throws IOException

      Throws:
        `IOException`

    - #### extractPart

          protected InputPart extractPart(org.apache.james.mime4j.message.BodyPart bodyPart)
                                   throws IOException

      Throws:
        `IOException`

    - #### main

          public static void main(String[] args)
                           throws Exception

      Throws:
        `Exception`

    - #### close

          public void close()

      Description copied from interface: `MultipartInput`
      Call this method to delete any temporary files created from unmarshalling this multipart message Otherwise they will be deleted on Garbage Collection or JVM exit.
      Specified by:
        `close` in interface `MultipartInput`

    - #### finalize

          protected void finalize()
                           throws Throwable

      Overrides:
        `finalize` in class `Object`
      Throws:
        `Throwable`

    - #### getCharset

          protected String getCharset(MediaType mediaType)

Copyright © 2014. All Rights Reserved.