code: protected InputStream getFileInputStream(String fieldName, List<FormItem> formItems) throws IOException, WebException {
          for (FormItem formItem : formItems) {
              if(formItem.isFile() && formItem.getFieldName().equals(fieldName)){
                  return formItem.openStream();
              }
          }
          throw new WebException("File with field named: '" + fieldName + "' not found");
      }
docs: Convenience method to get file content from <code>multipart/form-data</code> request.
  
  @param fieldName name of form field from the  <code>multipart/form-data</code> request corresponding to the uploaded file.
  @param formItems form items retrieved from <code>multipart/form-data</code> request.
  @return <code>InputStream</code> from which to read content of uploaded file.
  @throws IOException, WebException
  @throws WebException in case field name is not found in the request.