Examples of FileItemFactory


Examples of org.apache.commons.fileupload.FileItemFactory

    if (params.size() > 0) {
      action = (String) params.get(0);
    }
    if (ServletFileUpload
        .isMultipartContent(new ServletRequestContext(req))) {
      FileItemFactory factory = new DiskFileItemFactory();
      ServletFileUpload upload = new ServletFileUpload(factory);
      try {
        multipartItems = upload.parseRequest(req);
      } catch (FileUploadException e) {
        throw new InternalException(e);
View Full Code Here

Examples of org.apache.commons.fileupload.FileItemFactory

    @SuppressWarnings("unchecked")
    public void intercept(InterceptorStack stack, ResourceMethod method, Object instance)
        throws InterceptionException {
        logger.debug("Trying to parse multipart request.");

        FileItemFactory factory = createFactoryForDiskBasedFileItems(config.getDirectory());

        ServletFileUpload fileUploadHandler = new ServletFileUpload(factory);
        fileUploadHandler.setSizeMax(sizeLimit);

        try {
View Full Code Here

Examples of org.apache.tomcat.util.http.fileupload.FileItemFactory

   * @return {@link List}<{@link FileItem}>
   * @throws FileUploadException
   */
  @SuppressWarnings("unchecked")
  public List<FileItem> getFileItems() throws FileUploadException {
    FileItemFactory factory = new DefaultFileItemFactory();
    FileUpload upload = new FileUpload(factory);
    return upload.parseRequest(request);
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.