Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 7.0.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.catalina.core
Class ApplicationPart

    java.lang.Object
      org.apache.catalina.core.ApplicationPart

All Implemented Interfaces:
  Part

    public class ApplicationPart

extends Object
implements Part

Adaptor to allow `FileItem` objects generated by the package renamed commons-upload to be used by the Servlet 3.0 upload API that expects `Part`s.

Constructor Summary
`ApplicationPart(FileItem fileItem, MultipartConfigElement mce)`

Method Summary
`void` | `delete()`
`String` | `getContentType()`
`String` | `getFilename()`
`String` | `getHeader(String name)` Obtains the value of the specified mime header for the part.
`Collection<String>` | `getHeaderNames()`
`Collection<String>` | `getHeaders(String name)`
`InputStream` | `getInputStream()`
`String` | `getName()`
`long` | `getSize()`
`String` | `getString(String encoding)`
`void` | `write(String fileName)`

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

Constructor Detail

### ApplicationPart

    public ApplicationPart(FileItem fileItem,
                           MultipartConfigElement mce)

Method Detail

### delete

    public void delete()
                throws IOException

  Specified by:
    `delete` in interface `Part`
  Throws:
    `IOException`

### getContentType

    public String getContentType()

  Specified by:
    `getContentType` in interface `Part`

### getHeader

    public String getHeader(String name)

  Description copied from interface: `javax.servlet.http.Part`
  Obtains the value of the specified mime header for the part.

  Specified by:
    `getHeader` in interface `Part`
  Parameters:
    `name` - Header name
  Returns:
    The header value or `null` if the header is not present

### getHeaderNames

    public Collection<String> getHeaderNames()

  Specified by:
    `getHeaderNames` in interface `Part`

### getHeaders

    public Collection<String> getHeaders(String name)

  Specified by:
    `getHeaders` in interface `Part`

### getInputStream

    public InputStream getInputStream()
                               throws IOException

  Specified by:
    `getInputStream` in interface `Part`
  Throws:
    `IOException`

### getName

    public String getName()

  Specified by:
    `getName` in interface `Part`

### getSize

    public long getSize()

  Specified by:
    `getSize` in interface `Part`

### write

    public void write(String fileName)
               throws IOException

  Specified by:
    `write` in interface `Part`
  Throws:
    `IOException`

### getString

    public String getString(String encoding)
                     throws UnsupportedEncodingException

  Throws:
    `UnsupportedEncodingException`

### getFilename

    public String getFilename()

Overview | Package | Class | Tree | Deprecated | Index | Help
| Apache Tomcat 7.0.29
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2000-2012 Apache Software Foundation. All Rights Reserved.