com.vaadin.external.apache.commons.fileupload2.
Interface FileItemIterator
All Known Implementing Classes:
An iterator, as returned by
FileUploadBase.getItemIterator(RequestContext)
.
-
Method Summary
Modifier and TypeMethodDescriptionlong
Returns the maximum size of a single file.
long
Returns the maximum size of the complete HTTP request.
boolean
hasNext()
Returns, whether another instance of
FileItemStream
is available.next()
Returns the next available
FileItemStream
.void
setFileSizeMax
(long pFileSizeMax) Sets the maximum size of a single file.
void
setSizeMax
(long pSizeMax) Returns the maximum size of the complete HTTP request.
-
Method Details
-
getFileSizeMax
long getFileSizeMax()Returns the maximum size of a single file. An
FileSizeLimitExceededException
will be thrown, if there is an uploaded file, which is exceeding this value. By default, this value will be copied from theFileUploadBase
object, however, the user may replace the default value with a request specific value by invokingsetFileSizeMax(long)
on this object.Returns:
The maximum size of a single, uploaded file. The value -1 indicates "unlimited".
-
setFileSizeMax
void setFileSizeMax(long pFileSizeMax) Sets the maximum size of a single file. An
FileSizeLimitExceededException
will be thrown, if there is an uploaded file, which is exceeding this value. By default, this value will be copied from theFileUploadBase
object, however, the user may replace the default value with a request specific value by invokingsetFileSizeMax(long)
on this object, so there is no need to configure it here. Note:Changing this value doesn't affect files, that have already been uploaded.Parameters:
pFileSizeMax
- The maximum size of a single, uploaded file. The value -1 indicates "unlimited". -
getSizeMax
long getSizeMax()Returns the maximum size of the complete HTTP request. A
SizeLimitExceededException
will be thrown, if the HTTP request will exceed this value. By default, this value will be copied from theFileUploadBase
object, however, the user may replace the default value with a request specific value by invokingsetSizeMax(long)
on this object.Returns:
The maximum size of the complete HTTP request. The value -1 indicates "unlimited".
-
setSizeMax
void setSizeMax(long pSizeMax) Returns the maximum size of the complete HTTP request. A
SizeLimitExceededException
will be thrown, if the HTTP request will exceed this value. By default, this value will be copied from theFileUploadBase
object, however, the user may replace the default value with a request specific value by invokingsetSizeMax(long)
on this object. Note: Setting the maximum size on this object will work only, if the iterator is not yet initialized. In other words: If the methodshasNext()
,next()
have not yet been invoked.Parameters:
pSizeMax
- The maximum size of the complete HTTP request. The value -1 indicates "unlimited". -
hasNext
Returns, whether another instance of
FileItemStream
is available.Returns:
True, if one or more additional file items are available, otherwise false.
Throws:
FileUploadException
- Parsing or processing the file item failed.IOException
- Reading the file item failed. -
next
Returns the next available
FileItemStream
.Returns:
FileItemStream instance, which provides access to the next file item.
Throws:
NoSuchElementException
- No more items are available. UsehasNext()
to prevent this exception.FileUploadException
- Parsing or processing the file item failed.IOException
- Reading the file item failed. -
getFileItems
Throws:
-