@Contract(threading=IMMUTABLE) public class BasicHeader extends Object implements Header, Cloneable, Serializable
Header.| Constructor and Description |
|---|
BasicHeader(String name,
Object value)
Default constructor
|
BasicHeader(String name,
Object value,
boolean sensitive)
Constructor with sensitivity flag
|
| Modifier and Type | Method and Description |
|---|---|
BasicHeader |
clone() |
String |
getName()
Gets the name of this pair.
|
String |
getValue()
Gets the value of this pair.
|
boolean |
isSensitive()
Returns
true if the header should be considered sensitive. |
String |
toString() |
public BasicHeader(String name, Object value)
name - the header namevalue - the header value, taken as the value's toString().public BasicHeader(String name, Object value, boolean sensitive)
name - the header namevalue - the header value, taken as the value's toString().sensitive - sensitive flagpublic String getName()
NameValuePairgetName in interface NameValuePairnull.public String getValue()
NameValuePairgetValue in interface NameValuePairnull.public boolean isSensitive()
Headertrue if the header should be considered sensitive.
Some encoding schemes such as HPACK impose restrictions on encoded representation of sensitive headers.
isSensitive in interface Headertrue if the header should be considered sensitive.public BasicHeader clone() throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionCopyright © 2005–2021 The Apache Software Foundation. All rights reserved.