org.jboss.netty.handler.codec.spdy

## Interface SpdyHeaderBlock

All Known Subinterfaces:
  SpdyHeadersFrame, SpdySynReplyFrame, SpdySynStreamFrame

All Known Implementing Classes:
  DefaultSpdyHeaderBlock, DefaultSpdyHeadersFrame, DefaultSpdySynReplyFrame, DefaultSpdySynStreamFrame

    public interface SpdyHeaderBlock

A SPDY Name/Value Header Block which provides common properties for `SpdySynStreamFrame`, `SpdySynReplyFrame`, and `SpdyHeadersFrame`.

See Also:
  `SpdyHeaders`

### Method Summary

Methods
`void` `addHeader(String name, Object value)` Adds a new header with the specified name and value.
`void` `clearHeaders()` Removes all headers from this block.
`boolean` `containsHeader(String name)` Returns `true` if and only if there is a header with the specified header name.
`String` `getHeader(String name)` Returns the header value with the specified header name.
`Set<String>` `getHeaderNames()` Returns the `Set` of all header names that this block contains.
`List<Map.Entry<String,String>>` `getHeaders()` Returns all header names and values that this block contains.
`List<String>` `getHeaders(String name)` Returns the header values with the specified header name.
`boolean` `isInvalid()` Returns `true` if this header block is invalid.
`void` `removeHeader(String name)` Removes the header with the specified name.
`void` `setHeader(String name, Iterable<?> values)` Sets a new header with the specified name and values.
`void` `setHeader(String name, Object value)` Sets a new header with the specified name and value.
`void` `setInvalid()` Marks this header block as invalid.

### Method Detail

#### isInvalid

    boolean isInvalid()

Returns `true` if this header block is invalid. A RST_STREAM frame with code PROTOCOL_ERROR should be sent.

#### setInvalid

    void setInvalid()

Marks this header block as invalid.

#### getHeader

    String getHeader(String name)

Returns the header value with the specified header name. If there is more than one header value for the specified header name, the first value is returned.

Returns:
  the header value or `null` if there is no such header

#### getHeaders

    List<String> getHeaders(String name)

Returns the header values with the specified header name.

Returns:
  the `List` of header values. An empty list if there is no such header.

#### getHeaders

    List<Map.Entry<String,String>> getHeaders()

Returns all header names and values that this block contains.

Returns:
  the `List` of the header name-value pairs. An empty list if there is no header in this message.

#### containsHeader

    boolean containsHeader(String name)

Returns `true` if and only if there is a header with the specified header name.

#### getHeaderNames

    Set<String> getHeaderNames()

Returns the `Set` of all header names that this block contains.

#### addHeader

    void addHeader(String name,
                 Object value)

Adds a new header with the specified name and value.

#### setHeader

    void setHeader(String name,
                 Object value)

Sets a new header with the specified name and value. If there is an existing header with the same name, the existing header is removed.

#### setHeader

    void setHeader(String name,
                 Iterable<?> values)

Sets a new header with the specified name and values. If there is an existing header with the same name, the existing header is removed.

#### removeHeader

    void removeHeader(String name)

Removes the header with the specified name.

#### clearHeaders

    void clearHeaders()

Removes all headers from this block.