Codota Logo
FileUploadBase.parseRequest
Code IndexAdd Codota to your IDE (free)

How to use
parseRequest
method
in
org.apache.tomcat.util.http.fileupload.FileUploadBase

Best Java code snippets using org.apache.tomcat.util.http.fileupload.FileUploadBase.parseRequest (Showing top 3 results out of 315)

  • Add the Codota plugin to your IDE and get smart completions
private void myMethod () {
List l =
  • Codota Iconnew LinkedList()
  • Codota IconCollections.emptyList()
  • Codota Iconnew ArrayList()
  • Smart code suggestions by Codota
}
origin: codefollower/Tomcat-Research

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param ctx The context for the request to be parsed.
 *
 * @return A map of <code>FileItem</code> instances parsed from the request.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 *
 * @since 1.3
 */
public Map<String, List<FileItem>> parseParameterMap(RequestContext ctx)
    throws FileUploadException {
  final List<FileItem> items = parseRequest(ctx);
  final Map<String, List<FileItem>> itemsMap = new HashMap<>(items.size());
  for (FileItem fileItem : items) {
    String fieldName = fileItem.getFieldName();
    List<FileItem> mappedItems = itemsMap.get(fieldName);
    if (mappedItems == null) {
      mappedItems = new ArrayList<>();
      itemsMap.put(fieldName, mappedItems);
    }
    mappedItems.add(fileItem);
  }
  return itemsMap;
}
origin: org.ops4j.pax.tipi/org.ops4j.pax.tipi.tomcat-embed-core

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param ctx The context for the request to be parsed.
 *
 * @return A map of <code>FileItem</code> instances parsed from the request.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 *
 * @since 1.3
 */
public Map<String, List<FileItem>> parseParameterMap(RequestContext ctx)
    throws FileUploadException {
  final List<FileItem> items = parseRequest(ctx);
  final Map<String, List<FileItem>> itemsMap = new HashMap<>(items.size());
  for (FileItem fileItem : items) {
    String fieldName = fileItem.getFieldName();
    List<FileItem> mappedItems = itemsMap.get(fieldName);
    if (mappedItems == null) {
      mappedItems = new ArrayList<>();
      itemsMap.put(fieldName, mappedItems);
    }
    mappedItems.add(fileItem);
  }
  return itemsMap;
}
origin: org.apache.geronimo.ext.tomcat/util

/**
 * Processes an <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>
 * compliant <code>multipart/form-data</code> stream.
 *
 * @param ctx The context for the request to be parsed.
 *
 * @return A map of <code>FileItem</code> instances parsed from the request.
 *
 * @throws FileUploadException if there are problems reading/parsing
 *                             the request or storing files.
 *
 * @since 1.3
 */
public Map<String, List<FileItem>> parseParameterMap(RequestContext ctx)
    throws FileUploadException {
  final List<FileItem> items = parseRequest(ctx);
  final Map<String, List<FileItem>> itemsMap =
      new HashMap<String, List<FileItem>>(items.size());
  for (FileItem fileItem : items) {
    String fieldName = fileItem.getFieldName();
    List<FileItem> mappedItems = itemsMap.get(fieldName);
    if (mappedItems == null) {
      mappedItems = new ArrayList<FileItem>();
      itemsMap.put(fieldName, mappedItems);
    }
    mappedItems.add(fileItem);
  }
  return itemsMap;
}
org.apache.tomcat.util.http.fileuploadFileUploadBaseparseRequest

Javadoc

Processes an RFC 1867 compliant multipart/form-data stream. If files are stored on disk, the path is given by getRepository().

Popular methods of FileUploadBase

  • getFieldName
    Retrieves the field name from the Content-disposition header.
  • getFileItemFactory
    Returns the factory class used when creating file items.
  • getFileName
    Retrieves the file name from the Content-disposition header.
  • getBoundary
    Retrieves the boundary from the Content-type header.
  • getItemIterator
    Processes an RFC 1867 [http://www.ietf.org/rfc/rfc1867.txt] compliant multipart/form-data stream.
  • getParsedHeaders
    Parses the header-part and returns as key/value pairs. If there are multiple headers of the same
  • newFileItemHeaders
    Creates a new instance of FileItemHeaders.
  • parseEndOfLine
    Skips bytes until the end of the current line.
  • parseHeaderLine
    Reads the next header line.
  • isMultipartContent
    Utility method that determines whether the request contains multipart content. NOTE:This method wil
  • createItem
    Creates a new FileItem instance.
  • getHeader
    Returns the header with the specified name from the supplied map. The header lookup is case-insensit
  • createItem,
  • getHeader,
  • parseHeaders

Popular in Java

  • Parsing JSON documents to java classes using gson
  • setContentView (Activity)
  • getSharedPreferences (Context)
  • getSupportFragmentManager (FragmentActivity)
    Return the FragmentManager for interacting with fragments associated with this activity.
  • MalformedURLException (java.net)
    Thrown to indicate that a malformed URL has occurred. Either no legal protocol could be found in a s
  • ServerSocket (java.net)
    This class represents a server-side socket that waits for incoming client connections. A ServerSocke
  • URLConnection (java.net)
    The abstract class URLConnection is the superclass of all classes that represent a communications li
  • ImageIO (javax.imageio)
  • Reference (javax.naming)
  • SSLHandshakeException (javax.net.ssl)
    The exception that is thrown when a handshake could not be completed successfully.
Codota Logo
  • Products

    Search for Java codeSearch for JavaScript codeEnterprise
  • IDE Plugins

    IntelliJ IDEAWebStormAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogCodota Academy Plugin user guide Terms of usePrivacy policyJava Code IndexJavascript Code Index
Get Codota for your IDE now