public class BufferedHeader extends Object implements FormattedHeader, Serializable
Constructor and Description |
---|
BufferedHeader(CharArrayBuffer buffer)
Creates a new header from a buffer.
|
Modifier and Type | Method and Description |
---|---|
static BufferedHeader |
create(CharArrayBuffer buffer) |
CharArrayBuffer |
getBuffer()
Obtains the buffer with the formatted header.
|
String |
getName()
Gets the name of this pair.
|
String |
getValue()
Gets the value of this pair.
|
int |
getValuePos()
Obtains the start of the header value in the
buffer . |
boolean |
isSensitive()
Returns
true if the header should be considered sensitive. |
String |
toString() |
public BufferedHeader(CharArrayBuffer buffer) throws ParseException
buffer
- the buffer containing the header to representParseException
- in case of a parse errorpublic static BufferedHeader create(CharArrayBuffer buffer)
public 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 int getValuePos()
FormattedHeader
buffer
.
By accessing the value in the buffer, creation of a temporary string
can be avoided.getValuePos
in interface FormattedHeader
getBuffer
.public CharArrayBuffer getBuffer()
FormattedHeader
getBuffer
in interface FormattedHeader
Copyright © 2005–2021 The Apache Software Foundation. All rights reserved.