public interface ParameterParser extends ValueParser
NOTE: The name= portion of a name=value pair may be converted to lowercase or uppercase when the object is initialized and when new data is added. This behaviour is determined by the url.case.folding property in TurbineResources.properties. Adding a name/value pair may overwrite existing name=value pairs if the names match:
ParameterParser pp = data.getParameters(); pp.add("ERROR",1); pp.add("eRrOr",2); int result = pp.getInt("ERROR");In the above example, result is 2.
ValueParser.URLCaseFolding
DEFAULT_CHARACTER_ENCODING
Modifier and Type | Method and Description |
---|---|
void |
add(String name,
Part value)
Add a Part object as a parameters.
|
String |
getFileName(Part part)
Convenience fileName utility, which extracts the filename from header
|
Part |
getPart(String name)
Return a Part object for the given name.
|
Collection<Part> |
getParts()
Return an array of all Part objects.
|
Part[] |
getParts(String name)
Return an array of Part objects for the given name.
|
HttpServletRequest |
getRequest()
Gets the parsed servlet request.
|
byte[] |
getUploadData()
Gets the uploadData byte[]
|
void |
setRequest(HttpServletRequest req)
Sets the servlet request to be parser.
|
void |
setUploadData(byte[] uploadData)
Sets the uploadData byte[]
|
add, add, add, add, add, add, clear, containsKey, convert, convertAndTrim, convertAndTrim, dispose, get, getBigDecimal, getBigDecimal, getBigDecimals, getBoolean, getBoolean, getBooleanObject, getBooleanObject, getBooleanObjects, getBooleans, getByte, getByte, getByteObject, getByteObject, getBytes, getCharacterEncoding, getDate, getDate, getDate, getDateFormat, getDouble, getDouble, getDoubleObject, getDoubleObject, getDoubleObjects, getDoubles, getFloat, getFloat, getFloatObject, getFloatObject, getFloatObjects, getFloats, getInt, getInt, getIntObject, getIntObject, getIntObjects, getInts, getKeys, getLocale, getLong, getLong, getLongObject, getLongObject, getLongObjects, getLongs, getNumberFormat, getObject, getObjects, getString, getString, getStrings, getStrings, getUrlFolding, keySet, remove, setCharacterEncoding, setDateFormat, setLocale, setNumberFormat, setProperties, setString, setStrings, toString
forEach, iterator, spliterator
HttpServletRequest getRequest()
void setRequest(HttpServletRequest req)
To add name/value pairs to this set of parameters, use the
add()
methods.
req
- An HttpServletRequest.void setUploadData(byte[] uploadData)
uploadData
- A byte[] with data.byte[] getUploadData()
void add(String name, Part value)
name
- A String with the name.value
- A Part with the value.Part getPart(String name)
name
- A String with the name.Part[] getParts(String name)
name
- A String with the name.Collection<Part> getParts()
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.