|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface MultipartFormItem
MultipartFormItem - Represent an item from a form file-post. An item can be either a parameter or a file. If it is a parameter, use getName() and getValue() to get the name and value of the parameter. If it is a file, then use getFilename and writeFile to find the filename and then write the contents to an OutputStream.
| Method Summary | |
|---|---|
java.lang.String |
getContentType()
Returns the MIME content type of the file. |
java.lang.String |
getFilename()
Returns the filename of this item, or null if this is a parameter and not a file |
java.io.InputStream |
getInputStream()
Returns an InputStream that can be used to read the file. |
java.lang.String |
getName()
Returns the input-field name of this item in the form. |
java.lang.String |
getValue()
Returns the value of the parameter, or null if this is a file and not a parameter. |
long |
writeFile(java.io.OutputStream stream)
Writes the file to the given output stream. |
| Method Detail |
|---|
java.lang.String getValue()
java.lang.String getName()
java.lang.String getFilename()
java.lang.String getContentType()
long writeFile(java.io.OutputStream stream)
throws java.io.IOException
stream - the output stream to write to.
java.io.EOFException - if the length of this item
exceeds the maximum length set on the MultipartFormHandler
java.io.IOExceptiongetInputStream(),
MultipartFormHandler.setMaximumAllowedBytes(long)
java.io.InputStream getInputStream()
throws java.io.IOException
java.io.IOExceptionwriteFile(java.io.OutputStream)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||