@NotThreadSafe public class BufferedHeader extends java.lang.Object implements FormattedHeader, java.lang.Cloneable, java.io.Serializable
Constructor and Description |
---|
BufferedHeader(CharArrayBuffer buffer)
Creates a new header from a buffer.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone() |
CharArrayBuffer |
getBuffer()
Obtains the buffer with the formatted header.
|
HeaderElement[] |
getElements()
Parses the value.
|
java.lang.String |
getName()
Get the name of the Header.
|
java.lang.String |
getValue()
Get the value of the Header.
|
int |
getValuePos()
Obtains the start of the header value in the
buffer . |
java.lang.String |
toString() |
public BufferedHeader(CharArrayBuffer buffer) throws ParseException
buffer
- the buffer containing the header to representParseException
- in case of a parse errorpublic java.lang.String getName()
Header
public java.lang.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 java.lang.String toString()
toString
in class java.lang.Object
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException