Class RequestPartsIterator
java.lang.Object
org.apache.sling.engine.impl.parameters.RequestPartsIterator
- All Implemented Interfaces:
Iterator<javax.servlet.http.Part>
Contains a Lazy iterator of Parts from the request stream loaded as the request is streamed using the Commons FileUpload API.
-
Constructor Summary
ConstructorDescriptionRequestPartsIterator
(javax.servlet.http.HttpServletRequest servletRequest) Create and initialse the iterator using the request. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Iterator
forEachRemaining
-
Constructor Details
-
RequestPartsIterator
public RequestPartsIterator(javax.servlet.http.HttpServletRequest servletRequest) throws IOException, org.apache.commons.fileupload.FileUploadException Create and initialse the iterator using the request. The request must be fresh. Headers can have been read but the stream must not have been parsed.- Parameters:
servletRequest
- the request- Throws:
IOException
- when there is a problem reading the request.org.apache.commons.fileupload.FileUploadException
- when there is a problem parsing the request.
-
-
Method Details
-
hasNext
public boolean hasNext() -
next
public javax.servlet.http.Part next() -
remove
public void remove()
-