Class RequestParameters

  • All Implemented Interfaces:
    Serializable, Cloneable, Map<String,​Object>

    public class RequestParameters
    extends HashMap<String,​Object>
    A map of request parameter names to their values. Each name can correspond to multiple values, and values can be either Strings or Files.
    Author:
    Robert Fromont robert@fromont.net.nz
    See Also:
    Serialized Form
    • Constructor Detail

      • RequestParameters

        public RequestParameters()
        Default constructor.
    • Method Detail

      • getString

        public String getString​(String key)
        Gets the named item as a string.
        Parameters:
        key - The parameter name.
        Returns:
        The item as a String.
      • getStrings

        public String[] getStrings​(String key)
        Gets all parameters with the given name.
        Parameters:
        key - The parameter name.
        Returns:
        All parameter String values, or an empty array if there are none.
      • getFile

        public File getFile​(String key)
        Gets the named item as a list of files.
        Parameters:
        key - The parameter name.
        Returns:
        A list of FileItems.
      • getFiles

        public Vector<File> getFiles​(String key)
        Gets the named item as a list of files.
        Parameters:
        key - The parameter name.
        Returns:
        A list of FileItems, which may be empty.