public interface Part
| Modifier and Type | Method and Description |
|---|---|
String |
getContentType()
Gets the content type of this part.
|
String |
getHeader(String name)
Returns the value of the specified mime header as a
String. |
Collection<String> |
getHeaderNames()
Gets the header names of this Part.
|
Collection<String> |
getHeaders(String name)
Gets the values of the Part header with the given name.
|
InputStream |
getInputStream()
Gets the content of this part as an
InputStream |
String |
getName()
Gets the name of this part
|
long |
getSize()
Returns the size of this file.
|
InputStream getInputStream() throws IOException
InputStreamInputStreamIOException - If an error occurs in retrieving the content as an InputStreamString getContentType()
long getSize()
long specifying the size of this part, in bytes.String getHeader(String name)
String. If the Part did not include a header of the
specified name, this method returns null. If there are multiple headers with the same name, this method returns
the first header in the part. The header name is case insensitive. You can use this method with any request header.Collection<String> getHeaders(String name)
Any changes to the returned Collection must not affect this Part.
Part header names are case insensitive.
name - the header name whose values to returnCollection of the values of the header with the given nameCollection<String> getHeaderNames()
Some servlet containers do not allow servlets to access headers using this method, in which case this method returns
null
Any changes to the returned Collection must not affect this Part.
Collection of the header names of this PartCopyright © 2003–2017 MuleSoft, Inc.. All rights reserved.