Part

<p> This class represents a part or form item that was received within a <code>multipart/form-data</code> POST request.

@since Servlet 3.0

Members

Functions

getContentType
string getContentType()

Gets the content type of this part.

getHeader
string getHeader(string name)

Returns the value of the specified mime header as a <code>string</code>. If the Part did not include a header of the specified name, this method returns <code>null</code>. 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.

getHeaderNames
string[] getHeaderNames()

Gets the header names of this Part.

getHeaders
Collection!string getHeaders(string name)

Gets the values of the Part header with the given name.

getInputStream
InputStream getInputStream()

Gets the content of this part as an <tt>InputStream</tt>

getName
string getName()

Gets the name of this part

getSize
long getSize()

Returns the size of this fille.

getSubmittedFileName
string getSubmittedFileName()

Gets the file name specified by the client

remove
void remove()

Deletes the underlying storage for a file item, including deleting any associated temporary disk file.

toString
string toString()
Undocumented in source.
write
void write(string fileName)

A convenience method to write this uploaded item to disk.

Meta