Search in sources :

Example 1 with FileItemStream

use of org.apache.tomcat.util.http.fileupload.FileItemStream in project tomcat by apache.

the class FileItemIteratorImpl method getFileItems.

@Override
public List<FileItem> getFileItems() throws FileUploadException, IOException {
    final List<FileItem> items = new ArrayList<>();
    while (hasNext()) {
        final FileItemStream fis = next();
        final FileItem fi = fileUploadBase.getFileItemFactory().createItem(fis.getFieldName(), fis.getContentType(), fis.isFormField(), fis.getName());
        items.add(fi);
    }
    return items;
}
Also used : FileItem(org.apache.tomcat.util.http.fileupload.FileItem) FileItemStream(org.apache.tomcat.util.http.fileupload.FileItemStream) ArrayList(java.util.ArrayList)

Aggregations

ArrayList (java.util.ArrayList)1 FileItem (org.apache.tomcat.util.http.fileupload.FileItem)1 FileItemStream (org.apache.tomcat.util.http.fileupload.FileItemStream)1