Class RequestPartsIterator

java.lang.Object
org.apache.sling.engine.impl.parameters.RequestPartsIterator
All Implemented Interfaces:
Iterator<javax.servlet.http.Part>

public class RequestPartsIterator extends Object implements 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 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()
      Specified by:
      hasNext in interface Iterator<javax.servlet.http.Part>
    • next

      public javax.servlet.http.Part next()
      Specified by:
      next in interface Iterator<javax.servlet.http.Part>
    • remove

      public void remove()
      Specified by:
      remove in interface Iterator<javax.servlet.http.Part>