org.melati.util
Class HttpHeader

Package class diagram package HttpHeader
java.lang.Object
  extended by org.melati.util.HttpHeader
Direct Known Subclasses:
AcceptCharset

public class HttpHeader
extends Object

Representation of occurrences of an HTTP header field.

These are defined in RFC 2616 and have the same general form as in RFC 822 section 3.1.

We generally assume that all continuation lines and occurrences in a message are concatenated with comma separators.

Author:
Jim Wright

Nested Class Summary
 class HttpHeader.FieldIterator
          Abstract enumeration of fields.
static class HttpHeader.HttpHeaderException
           
static class HttpHeader.TokenAndQValue
          A token and associated qvalue.
 class HttpHeader.TokenAndQValueIterator
          Iteration over HttpHeader.TokenAndQValues.
static class HttpHeader.Tokenizer
          Tokenizer for parsing occurences of a field.
 class HttpHeader.WordIterator
          Iteration over HttpHeader.TokenAndQValues.
 
Field Summary
protected  HttpHeader.Tokenizer tokenizer
          Instance of inner HttpHeader.Tokenizer.
 
Constructor Summary
HttpHeader(String values)
          Create an instance representing the given comma separated fields.
 
Method Summary
 HttpHeader.TokenAndQValue nextTokenAndQValue()
          Factory method to create and return the next HttpHeader.TokenAndQValue.
 HttpHeader.TokenAndQValueIterator tokenAndQValueIterator()
          Factory method to create and return an iterator of HttpHeader.TokenAndQValue's.
 HttpHeader.WordIterator wordIterator()
          Factory method to create and return an iterator of words.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

tokenizer

protected HttpHeader.Tokenizer tokenizer
Instance of inner HttpHeader.Tokenizer.

Constructor Detail

HttpHeader

public HttpHeader(String values)
Create an instance representing the given comma separated fields.

Method Detail

wordIterator

public final HttpHeader.WordIterator wordIterator()
Factory method to create and return an iterator of words.

Returns:
a new WordIterator

nextTokenAndQValue

public HttpHeader.TokenAndQValue nextTokenAndQValue()
                                             throws HttpHeader.HttpHeaderException
Factory method to create and return the next HttpHeader.TokenAndQValue.

Returns:
a new TokenAndQValue
Throws:
HttpHeader.HttpHeaderException

tokenAndQValueIterator

public HttpHeader.TokenAndQValueIterator tokenAndQValueIterator()
Factory method to create and return an iterator of HttpHeader.TokenAndQValue's.

Returns:
a new TokenAndQValueIterator


Copyright © 2000-2010 PanEris. All Rights Reserved.