public class BufferedHeader extends Object implements FormattedHeader, Cloneable, Serializable
Modifier and Type | Field and Description |
---|---|
private CharArrayBuffer |
buffer
The buffer containing the entire header line.
|
private String |
name
Header name.
|
private static long |
serialVersionUID |
private int |
valuePos
The beginning of the header value in the buffer
|
Constructor and Description |
---|
BufferedHeader(CharArrayBuffer buffer)
Creates a new header from a buffer.
|
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
CharArrayBuffer |
getBuffer()
Obtains the buffer with the formatted header.
|
HeaderElement[] |
getElements()
Parses the value.
|
String |
getName()
Get the name of the Header.
|
String |
getValue()
Get the value of the Header.
|
int |
getValuePos()
Obtains the start of the header value in the
buffer . |
String |
toString() |
private static final long serialVersionUID
private final CharArrayBuffer buffer
private final int valuePos
public BufferedHeader(CharArrayBuffer buffer) throws ParseException
buffer
- the buffer containing the header to representParseException
- in case of a parse errorpublic String getName()
Header
public String getValue()
Header
public HeaderElement[] getElements() throws ParseException
Header
getElements
in interface Header
HeaderElement
entries, may be empty, but is never null
ParseException
- in case of a parsing errorpublic 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
public Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses