public interface Part
multipart/form-data request body. The part may represent either
 an uploaded file or form data.| Modifier and Type | Method and Description | 
|---|---|
| void | delete()Deletes the underlying storage for a part, including deleting any
 associated temporary disk file. | 
| java.lang.String | getContentType()Obtain the content type passed by the browser or  nullif not
 defined. | 
| java.lang.String | getHeader(java.lang.String name)Obtains the value of the specified part header as a String. | 
| java.util.Collection<java.lang.String> | getHeaderNames()Returns a Collection of all the header names provided for this part. | 
| java.util.Collection<java.lang.String> | getHeaders(java.lang.String name)Obtain all the values of the specified part header. | 
| java.io.InputStream | getInputStream()Obtain an  InputStreamthat can be used to retrieve the
 contents of the file. | 
| java.lang.String | getName()Obtain the name of the field in the multipart form corresponding to this
 part. | 
| long | getSize()Obtain the size of this part. | 
| void | write(java.lang.String fileName)A convenience method to write an uploaded part to disk. | 
java.io.InputStream getInputStream()
                                   throws java.io.IOException
InputStream that can be used to retrieve the
 contents of the file.java.io.IOExceptionjava.lang.String getContentType()
null if not
 defined.java.lang.String getName()
long getSize()
void write(java.lang.String fileName)
           throws java.io.IOException
fileName - The location into which the uploaded part should be
                  stored. Relative locations are relative to MultipartConfigElement.getLocation()java.io.IOExceptionvoid delete()
            throws java.io.IOException
Containers are only required to delete the associated storage when the Part instance is garbage collected. Apache Tomcat will delete the associated storage when the associated request has finished processing. Behaviour of other containers may be different.
java.io.IOExceptionjava.lang.String getHeader(java.lang.String name)
name - Header namenull if the header is not
              presentjava.util.Collection<java.lang.String> getHeaders(java.lang.String name)
java.util.Collection<java.lang.String> getHeaderNames()
Copyright © 2000-2015 Apache Software Foundation. All Rights Reserved.