public class

BufferedHeader

extends Object
implements Serializable Cloneable FormattedHeader
java.lang.Object
   ↳ org.apache.http.message.BufferedHeader

Class Overview

This class represents a raw HTTP header whose content is parsed 'on demand' only when the header value needs to be consumed.

Summary

Public Constructors
BufferedHeader(CharArrayBuffer buffer)
Creates a new header from a buffer.
Public Methods
Object clone()
CharArrayBuffer getBuffer()
Obtains the buffer with the formatted header.
HeaderElement[] getElements()
String getName()
String getValue()
int getValuePos()
Obtains the start of the header value in the buffer.
String toString()
[Expand]
Inherited Methods
From class java.lang.Object
From interface org.apache.http.FormattedHeader
From interface org.apache.http.Header

Public Constructors

public BufferedHeader (CharArrayBuffer buffer)

Creates a new header from a buffer. The name of the header will be parsed immediately, the value only if it is accessed.

Parameters
buffer the buffer containing the header to represent
Throws
ParseException in case of a parse error

Public Methods

public Object clone ()

public CharArrayBuffer getBuffer ()

Obtains the buffer with the formatted header. The returned buffer MUST NOT be modified.

Returns
  • the formatted header, in a buffer that must not be modified

public HeaderElement[] getElements ()

public String getName ()

public String getValue ()

public int getValuePos ()

Obtains the start of the header value in the buffer. By accessing the value in the buffer, creation of a temporary string can be avoided.

Returns
  • index of the first character of the header value in the buffer returned by getBuffer.

public String toString ()