This class represents a part or form item that was received within a
multipart/form-data POST request.
| Modifier and Type | Method and Description |
|---|---|
| public void | delete()
Deletes the underlying storage for a file item, including deleting any associated temporary disk file. |
| public String | |
| public String | |
| public Collection | Returns: a (possibly empty)Collection of the header
names of this PartGets the header names of this Part. |
| public Collection | Returns: a (possibly empty)Collection of the values of
the header with the given namethe header name whose values to return name)Gets the values of the Part header with the given name. |
| public InputStream | Returns: The content of this part as an InputStreamGets the content of this part as an InputStream |
| public String | |
| public long | |
| public String | |
| public void | write(String
The location into which the uploaded part should
be stored. The value may be a file name or a path. The actual
location of the file in the filesystem is relative to fileName)javax.servlet.MultipartConfigElement#getLocation(). Absolute
paths are used as provided and are relative to
getLocation().Note that this is a system dependent string and URI notation may not be acceptable on all systems. For portability, this string should be generated with the File or Path APIs. A convenience method to write this uploaded item to disk. |
| delete | back to summary |
|---|---|
| public void delete() throws IOException Deletes the underlying storage for a file item, including deleting any associated temporary disk file.
| |
| getContentType | back to summary |
|---|---|
| public String getContentType() Gets the content type of this part.
| |
| getHeader | back to summary |
|---|---|
| public String getHeader(String name) Returns the value of the specified mime header
as a | |
| getHeaderNames | back to summary |
|---|---|
| public Collection Gets the header names of this Part. Some servlet containers do not allow
servlets to access headers using this method, in
which case this method returns Any changes to the returned
| |
| getHeaders | back to summary |
|---|---|
| public Collection Gets the values of the Part header with the given name. Any changes to the returned Part header names are case insensitive.
| |
| getInputStream | back to summary |
|---|---|
| public InputStream getInputStream() throws IOException Gets the content of this part as an InputStream
| |
| getName | back to summary |
|---|---|
| public String getName() Gets the name of this part
| |
| getSize | back to summary |
|---|---|
| public long getSize() Returns the size of this fille.
| |
| getSubmittedFileName | back to summary |
|---|---|
| public String getSubmittedFileName() Gets the file name specified by the client
| |
| write | back to summary |
|---|---|
| public void write(String fileName) throws IOException A convenience method to write this uploaded item to disk. This method is not guaranteed to succeed if called more than once for the same part. This allows a particular implementation to use, for example, file renaming, where possible, rather than copying all of the underlying data, thus gaining a significant performance benefit.
| |