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 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. on the iterator, you discard all data,
which hasn't been read so far from the previous data.
| Modifier and Type | Class and Description |
|---|---|
| public static class | FileItemStream.
This exception is thrown, if an attempt is made to read
data from the |
| Modifier and Type | Method and Description |
|---|---|
| public String | Returns: The content type passed by the browser ornull if
not defined.Returns the content type passed by the browser or |
| public String | Returns: The name of the form field.Returns the name of the field in the multipart form corresponding to this file item. |
| public String | Returns: The original file name in the client's file system.Returns the original file name in the client's file system, as provided by the browser (or other client software). |
| public boolean | Returns: true if the instance represents a simple form
field; false if it represents an uploaded file.Determines whether or not a |
| public InputStream | Returns: The input stream, from which the items data may be read.Creates an |
| getContentType | back to summary |
|---|---|
| public String getContentType() Returns the content type passed by the browser or
| |
| getFieldName | back to summary |
|---|---|
| public String getFieldName() Returns the name of the field in the multipart form corresponding to this file item.
| |
| getName | back to summary |
|---|---|
| public String getName() Returns the original file name in the client's file system, 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.
| |
| isFormField | back to summary |
|---|---|
| public boolean isFormField() Determines whether or not a
| |
| openStream | back to summary |
|---|---|
| public InputStream openStream() throws IOException Creates an
| |
InputStream, which has been returned
by FileItemStream#openStream(), after
java.util.Iterator#hasNext() has been invoked on the
iterator, which created the FileItemStream.
| Modifier and Type | Field and Description |
|---|---|
| private static final long | serialVersionUID
The exceptions serial version UID, which is being used
when serializing an exception instance.
|
| Access | Constructor and Description |
|---|---|
| public |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID Hides java. The exceptions serial version UID, which is being used when serializing an exception instance. | |
| ItemSkippedException | back to summary |
|---|---|
| public ItemSkippedException() | |