| org.apache.commons.fileupload.FileItemStream
FileItemStream | public interface FileItemStream (Code) | | This interface provides access to a file or form item that was
received within a multipart/form-data POST request.
The items contents are retrieved by calling
FileItemStream.openStream() .
Instances of this class are created by accessing the
iterator, returned by
FileUploadBase.getItemIterator(RequestContext) .
Note: There is an interaction between the iterator and
its associated instances of
FileItemStream : By invoking
java.util.Iterator.hasNext on the iterator, you discard all data,
which hasn't been read so far from the previous data.
|
Inner Class :public static class ItemSkippedException extends IOException | |
Method Summary | |
String | getContentType() Returns the content type passed by the browser or null if
not defined. | String | getFieldName() Returns the name of the field in the multipart form corresponding to
this file item. | String | getName() Returns the original filename in the client's filesystem, as provided by
the browser (or other client software). | boolean | isFormField() Determines whether or not a FileItem instance represents
a simple form field. | InputStream | openStream() Creates an
InputStream , which allows to read the
items contents.
The input stream, from which the items data maybe read. throws: IllegalStateException - The method was already invoked onthis item. |
getContentType | String getContentType()(Code) | | Returns the content type passed by the browser or null if
not defined.
The content type passed by the browser or null ifnot defined. |
getFieldName | String getFieldName()(Code) | | Returns the name of the field in the multipart form corresponding to
this file item.
The name of the form field. |
getName | String getName()(Code) | | Returns the original filename in the client's filesystem, as provided by
the browser (or other client software). In most cases, this will be the
base file name, without path information. However, some clients, such as
the Opera browser, do include path information.
The original filename in the client's filesystem. |
isFormField | boolean isFormField()(Code) | | Determines whether or not a FileItem instance represents
a simple form field.
true if the instance represents a simple formfield; false if it represents an uploaded file. |
openStream | InputStream openStream() throws IOException(Code) | | Creates an
InputStream , which allows to read the
items contents.
The input stream, from which the items data maybe read. throws: IllegalStateException - The method was already invoked onthis item. It is not possible to recreate the data stream. throws: IOException - An I/O error occurred. See Also: ItemSkippedException |
|
|