Android

org.apache.http.message.BufferedHeader

java.lang.Object
org.apache.http.message.BufferedHeader Cloneable FormattedHeader

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()
Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.
          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()
Returns a string containing a concise, human-readable description of the receiver.
Methods inherited from class java.lang.Object
Methods inherited from interface org.apache.http.FormattedHeader
Methods inherited from interface org.apache.http.Header

Details

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()

Returns a new instance of the same class as the receiver, whose slots have been filled in with the values in the slots of the receiver.

Classes which wish to support cloning must specify that they implement the Cloneable interface, since the implementation checks for this.

Returns

  • Object a shallow copy of this object.

public CharArrayBuffer getBuffer()

Obtains the buffer with the formatted header. The returned buffer 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.

public String toString()

Returns a string containing a concise, human-readable description of the receiver.

Returns

  • String a printable representation for the receiver.
Copyright 2007 Google Inc. Build 0.9_r1-98467 - 14 Aug 2008 18:48