public interface Part
Modifier and Type | Method and Description |
---|---|
void |
delete()
Delete any underlying storage for this part.
|
java.lang.String |
getContentType()
Returns the MIME Content-Type of the part.
|
java.lang.String |
getHeader(java.lang.String name)
Returns the specified MIME header value, or null if no such header
exists.
|
java.util.Collection<java.lang.String> |
getHeaderNames()
Returns the header names for this part.
|
java.util.Collection<java.lang.String> |
getHeaders(java.lang.String name)
Returns the specified MIME header values, or an empty collection if
no such header exists.
|
java.io.InputStream |
getInputStream()
Returns the part content.
|
java.lang.String |
getName()
Returns the name of this part.
|
long |
getSize()
Returns the size of the part.
|
void |
write(java.lang.String fileName)
Convenience method to write this part to disk.
|
java.io.InputStream getInputStream() throws java.io.IOException
java.io.IOException
java.lang.String getContentType()
java.lang.String getName()
long getSize()
void write(java.lang.String fileName) throws java.io.IOException
fileName
- the name of the file to write to, relative to the
location specified in MultipartConfig.java.io.IOException
void delete() throws java.io.IOException
java.io.IOException
java.lang.String getHeader(java.lang.String name)
java.util.Collection<java.lang.String> getHeaders(java.lang.String name)
java.util.Collection<java.lang.String> getHeaderNames()