## com.sun.jersey.multipart
Class BodyPartEntity

    java.lang.Object
      com.sun.jersey.multipart.BodyPartEntity

All Implemented Interfaces:
  java.io.Closeable

    public class BodyPartEntity

extends java.lang.Object
implements java.io.Closeable

Proxy class representing the entity of a `BodyPart` when a `MultiPart` entity is received and parsed.

Its primary purpose is to provide an input stream to retrieve the actual data. However, it also transparently deals with storing the data in a temporary disk file, if it is larger than a configurable size; otherwise, the data is stored in memory for faster processing.

Constructor Summary
`BodyPartEntity(org.jvnet.mimepull.MIMEPart mimePart)` Construct a new `BodyPartEntity` with a `MIMEPart`.

Method Summary
`void` | `cleanup()` Clean up temporary file(s), if any were utilized.
`void` | `close()` Defer to `cleanup()`.
`java.io.InputStream` | `getInputStream()` Get the input stream to the raw bytes of this body part entity.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### BodyPartEntity

    public BodyPartEntity(org.jvnet.mimepull.MIMEPart mimePart)

  Construct a new `BodyPartEntity` with a `MIMEPart`.

  Parameters:
    `mimePart` - `MIMEPart` containing the input stream of this body part entity.

Method Detail

### getInputStream

    public java.io.InputStream getInputStream()

  Get the input stream to the raw bytes of this body part entity.

  Returns:
    the input stream of the body part entity.

### cleanup

    public void cleanup()

  Clean up temporary file(s), if any were utilized.

### close

    public void close()
               throws java.io.IOException

  Defer to `cleanup()`.

  Specified by:
    `close` in interface `java.io.Closeable`
  Throws:
    `java.io.IOException`

Copyright © 2017 Oracle Corporation. All Rights Reserved.