Class w3c.www.http.HttpBag
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class w3c.www.http.HttpBag

java.lang.Object
   |
   +----w3c.www.http.BasicValue
           |
           +----w3c.www.http.HttpBag

public class HttpBag
extends BasicValue
Internal representation of protocol headers conforming to the bag spec. The bag specification is part of the Protocol Extension Protocol defined by w3c, it can be found

Method Index

 o addBag(HttpBag)
Add a named bag into this bag.
 o addItem(String)
Add an item into this bag.
 o getBag(String)
Get a named sub-bag from this bag.
 o getName()
Get this bag names
 o getValue()
HeaderValue implemenntation - Get this header value.
 o hasBag(String)
Does this bag have a named sub-bag of the given name ?
 o hasItem(String)
Does this bag contains the given item, being a bag or a simple word.
 o keys()
Get all named items from this bag.
 o parse()
Parse this header value into its various components.
 o parseBag(ParseState)
 o updateByteValue()
Update the RFC822 compatible header value for this object.

Methods

 o updateByteValue
  protected final void updateByteValue()
Update the RFC822 compatible header value for this object.
Overrides:
updateByteValue in class BasicValue
 o parseBag
  protected HttpBag parseBag(ParseState ps) throws HttpParserException
 o parse
  protected final void parse() throws HttpParserException
Parse this header value into its various components.
Overrides:
parse in class BasicValue
 o getValue
  public Object getValue()
HeaderValue implemenntation - Get this header value.
Overrides:
getValue in class BasicValue
 o getName
  public String getName()
Get this bag names
Returns:
The name of this bag.
 o addBag
  public void addBag(HttpBag subbag)
Add a named bag into this bag.
Parameters:
bag - The bag to add (in case item is a bag).
 o hasBag
  public boolean hasBag(String name)
Does this bag have a named sub-bag of the given name ?
Parameters:
name - The name of the sub-bag to be tested for.
Returns:
true if this sub-bag exists.
 o getBag
  public HttpBag getBag(String name)
Get a named sub-bag from this bag.
Parameters:
name - The name of the sub-bag to get.
Returns:
A bag instance, or null if none was found.
 o addItem
  public void addItem(String name)
Add an item into this bag.
Parameters:
name - The new item name.
 o hasItem
  public boolean hasItem(String name)
Does this bag contains the given item, being a bag or a simple word.
Parameters:
name - The name of the item to test.
Returns:
true if the bag contains the given item, false otherwise.
 o keys
  public Enumeration keys()
Get all named items from this bag. This include both named sub-bags and items by their own.

All Packages  Class Hierarchy  This Package  Previous  Next  Index