public class ParametrizedHeaderValue extends Object
Examples:
Content-Type: text/plain; charset=ASCII Set-Cookie: __VCAP_ID__=a8f33cb4-bdc9-4cef-7679-15212b52907c; Path=/; HttpOnly; Secure
"text/plain" is the token
, "char=ASCII" is a parameter
(which is sometimes, e.g. in the context of RFC6265, called an "attribute"), and "HttpOnly" is a parameter
with an empty value (""
).
Constructor and Description |
---|
ParametrizedHeaderValue(String s) |
Modifier and Type | Method and Description |
---|---|
String |
getParameter(String name) |
String |
getToken() |
String |
removeParameter(String name)
Removes the given parameter if it exists.
|
String |
setParameter(String name,
String value)
Adds the given parameter, or changes the value of an existing parameter with that name.
|
String |
toString() |
public ParametrizedHeaderValue(String s)
public String getToken()
ParametrizedHeaderValue
@Nullable public String getParameter(String name)
name
- The (case-insensitive) parameter namenull
iff a parameter with that name does not existParametrizedHeaderValue
@Nullable public String setParameter(String name, String value)
null
iff a parameter with that name did
not exist@Nullable public String removeParameter(String name)
null
iff a parameter with that name did
not existCopyright © 2018 Arno Unkrig. All rights reserved.