FileDocCategorySizeDatePackage
NetscapeDraftHeaderParser.javaAPI DocAndroid 1.5 API3114Wed May 06 22:41:10 BST 2009org.apache.http.impl.cookie

NetscapeDraftHeaderParser

public class NetscapeDraftHeaderParser extends Object

Fields Summary
public static final NetscapeDraftHeaderParser
DEFAULT
private static final char[]
DELIMITERS
private final BasicHeaderValueParser
nvpParser
Constructors Summary
public NetscapeDraftHeaderParser()

    
      
        super();
        this.nvpParser = BasicHeaderValueParser.DEFAULT;
    
Methods Summary
public org.apache.http.HeaderElementparseHeader(org.apache.http.util.CharArrayBuffer buffer, org.apache.http.message.ParserCursor cursor)

        if (buffer == null) {
            throw new IllegalArgumentException("Char array buffer may not be null");
        }
        if (cursor == null) {
            throw new IllegalArgumentException("Parser cursor may not be null");
        }
        NameValuePair nvp = this.nvpParser.parseNameValuePair(buffer, cursor, DELIMITERS);
        List<NameValuePair> params = new ArrayList<NameValuePair>(); 
        while (!cursor.atEnd()) {
            NameValuePair param = this.nvpParser.parseNameValuePair(buffer, cursor, DELIMITERS);
            params.add(param);
        }
        return new BasicHeaderElement(
                nvp.getName(), 
                nvp.getValue(), params.toArray(new NameValuePair[params.size()]));