@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()
NameValuePair
getName
in interface NameValuePair
null
.public String getValue()
NameValuePair
getValue
in interface NameValuePair
null
.public boolean isSensitive()
Header
true
if the header should be considered sensitive.
Some encoding schemes such as HPACK impose restrictions on encoded representation of sensitive headers.
isSensitive
in interface Header
true
if the header should be considered sensitive.public BasicHeader clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.