|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.commons.fileupload.FileUploadBase.FileItemIteratorImpl
private class FileUploadBase.FileItemIteratorImpl
The iterator, which is returned by
FileUploadBase.getItemIterator(RequestContext)
.
Nested Class Summary | |
---|---|
private class |
FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl
Default implementation of FileItemStream . |
Field Summary | |
---|---|
private byte[] |
boundary
The boundary, which separates the various parts. |
private java.lang.String |
currentFieldName
The current items field name. |
private FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl |
currentItem
The item, which we currently process. |
private boolean |
eof
Whether we have seen the end of the file. |
private boolean |
itemValid
Whether the current item may still be read. |
private MultipartStream |
multi
The multi part stream to process. |
private MultipartStream.ProgressNotifier |
notifier
The notifier, which used for triggering the ProgressListener . |
private boolean |
skipPreamble
Whether we are currently skipping the preamble. |
Constructor Summary | |
---|---|
FileUploadBase.FileItemIteratorImpl(RequestContext ctx)
Creates a new instance. |
Method Summary | |
---|---|
private boolean |
findNextItem()
Called for finding the nex item, if any. |
private long |
getContentLength(FileItemHeaders pHeaders)
|
boolean |
hasNext()
Returns, whether another instance of FileItemStream
is available. |
FileItemStream |
next()
Returns the next available FileItemStream . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private final MultipartStream multi
private final MultipartStream.ProgressNotifier notifier
ProgressListener
.
private final byte[] boundary
private FileUploadBase.FileItemIteratorImpl.FileItemStreamImpl currentItem
private java.lang.String currentFieldName
private boolean skipPreamble
private boolean itemValid
private boolean eof
Constructor Detail |
---|
FileUploadBase.FileItemIteratorImpl(RequestContext ctx) throws FileUploadException, java.io.IOException
ctx
- The request context.
FileUploadException
- An error occurred while
parsing the request.
java.io.IOException
- An I/O error occurred.Method Detail |
---|
private boolean findNextItem() throws java.io.IOException
java.io.IOException
- An I/O error occurred.private long getContentLength(FileItemHeaders pHeaders)
public boolean hasNext() throws FileUploadException, java.io.IOException
FileItemStream
is available.
hasNext
in interface FileItemIterator
FileUploadException
- Parsing or processing the
file item failed.
java.io.IOException
- Reading the file item failed.public FileItemStream next() throws FileUploadException, java.io.IOException
FileItemStream
.
next
in interface FileItemIterator
java.util.NoSuchElementException
- No more items are
available. Use hasNext()
to prevent this exception.
FileUploadException
- Parsing or processing the
file item failed.
java.io.IOException
- Reading the file item failed.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |