public interface Part
The Part API.
- Author:
- Manfred Riem ([email protected])
-
Method Summary
Modifier and Type Method Description void
delete()
Delete the part.java.lang.String
getContentType()
Get the content type.java.lang.String
getHeader(java.lang.String name)
Get the header.java.util.Collection<java.lang.String>
getHeaderNames()
Get the header names.java.util.Collection<java.lang.String>
getHeaders(java.lang.String name)
Get the headers.java.io.InputStream
getInputStream()
Get the input stream.java.lang.String
getName()
Get the name.long
getSize()
Get the size.java.lang.String
getSubmittedFileName()
Get the submitted filename.void
write(java.lang.String filename)
Write to the given filename.
-
Method Details
-
delete
void delete() throws java.io.IOExceptionDelete the part.- Throws:
java.io.IOException
- when an I/O error occurs.
-
getContentType
java.lang.String getContentType()Get the content type.- Returns:
- the content type.
-
getHeader
java.lang.String getHeader(java.lang.String name)Get the header.- Parameters:
name
- the name.- Returns:
- the header, or null.
-
getHeaderNames
java.util.Collection<java.lang.String> getHeaderNames()Get the header names.- Returns:
- the header names.
-
getHeaders
java.util.Collection<java.lang.String> getHeaders(java.lang.String name)Get the headers.- Parameters:
name
- the name.- Returns:
- the headers.
-
getInputStream
java.io.InputStream getInputStream() throws java.io.IOExceptionGet the input stream.- Returns:
- the input stream.
- Throws:
java.io.IOException
- when an I/O error occurs.
-
getName
java.lang.String getName()Get the name.- Returns:
- the name.
-
getSize
long getSize()Get the size.- Returns:
- the size.
-
getSubmittedFileName
java.lang.String getSubmittedFileName()Get the submitted filename.- Returns:
- the submitted filename.
-
write
void write(java.lang.String filename) throws java.io.IOExceptionWrite to the given filename.- Parameters:
filename
- the filename.- Throws:
java.io.IOException
- when an I/O error occurs.
-