## org.apache.http.message
Class BasicHeader

    java.lang.Object
      org.apache.http.message.BasicHeader

All Implemented Interfaces:
  Serializable, Cloneable, Header

    @Immutable
    public class BasicHeader

extends Object
implements Header, Cloneable, Serializable

Basic implementation of `Header`.

Since:
  4.0
See Also:
  Serialized Form

Constructor Summary
`BasicHeader(String name, String value)` Constructor with name and value

Method Summary
`Object` `clone()`
`HeaderElement[]` `getElements()` Parses the value.
`String` `getName()` Get the name of the Header.
`String` `getValue()` Get the value of the Header.
`String` `toString()`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### BasicHeader

    public BasicHeader(String name,
                       String value)

  Constructor with name and value

  Parameters:
    `name` - the header name
    `value` - the header value

Method Detail

### getName

    public String getName()

  Description copied from interface: `Header`
  Get the name of the Header.

  Specified by:
    `getName` in interface `Header`
  Returns:
    the name of the Header, never `null`

### getValue

    public String getValue()

  Description copied from interface: `Header`
  Get the value of the Header.

  Specified by:
    `getValue` in interface `Header`
  Returns:
    the value of the Header, may be `null`

### toString

    public String toString()

  Overrides:
    `toString` in class `Object`

### getElements

    public HeaderElement[] getElements()
                                throws ParseException

  Description copied from interface: `Header`
  Parses the value.

  Specified by:
    `getElements` in interface `Header`
  Returns:
    an array of `HeaderElement` entries, may be empty, but is never `null`
  Throws:
    `ParseException`

### clone

    public Object clone()
                 throws CloneNotSupportedException

  Overrides:
    `clone` in class `Object`
  Throws:
    `CloneNotSupportedException`

Copyright © 2005-2013 The Apache Software Foundation. All Rights Reserved.