1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
5
<!-- Generated by javadoc (build 1.5.0_11) on Sat Aug 18 11:01:01 CEST 2007 -->
6
<META http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
8
CookieSpec (HttpClient 3.1 API)
11
<META NAME="keywords" CONTENT="org.apache.commons.httpclient.cookie.CookieSpec interface">
13
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">
15
<SCRIPT type="text/javascript">
16
function windowTitle()
18
parent.document.title="CookieSpec (HttpClient 3.1 API)";
26
<BODY BGCOLOR="white" onload="windowTitle();">
29
<!-- ========= START OF TOP NAVBAR ======= -->
30
<A NAME="navbar_top"><!-- --></A>
31
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
32
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
34
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
35
<A NAME="navbar_top_firstrow"><!-- --></A>
36
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
37
<TR ALIGN="center" VALIGN="top">
38
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
39
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
40
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
41
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CookieSpec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
42
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
43
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
44
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
45
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
49
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
55
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
56
<A HREF="../../../../../org/apache/commons/httpclient/cookie/CookiePolicy.html" title="class in org.apache.commons.httpclient.cookie"><B>PREV CLASS</B></A>
57
<A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpecBase.html" title="class in org.apache.commons.httpclient.cookie"><B>NEXT CLASS</B></A></FONT></TD>
58
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
59
<A HREF="../../../../../index.html?org/apache/commons/httpclient/cookie/CookieSpec.html" target="_top"><B>FRAMES</B></A>
60
<A HREF="CookieSpec.html" target="_top"><B>NO FRAMES</B></A>
61
<SCRIPT type="text/javascript">
64
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
69
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
76
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
77
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
78
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
79
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
82
<A NAME="skip-navbar_top"></A>
83
<!-- ========= END OF TOP NAVBAR ========= -->
86
<!-- ======== START OF CLASS DATA ======== -->
89
org.apache.commons.httpclient.cookie</FONT>
91
Interface CookieSpec</H2>
93
<DT><B>All Known Implementing Classes:</B> <DD><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpecBase.html" title="class in org.apache.commons.httpclient.cookie">CookieSpecBase</A>, <A HREF="../../../../../org/apache/commons/httpclient/cookie/IgnoreCookiesSpec.html" title="class in org.apache.commons.httpclient.cookie">IgnoreCookiesSpec</A>, <A HREF="../../../../../org/apache/commons/httpclient/cookie/NetscapeDraftSpec.html" title="class in org.apache.commons.httpclient.cookie">NetscapeDraftSpec</A>, <A HREF="../../../../../org/apache/commons/httpclient/cookie/RFC2109Spec.html" title="class in org.apache.commons.httpclient.cookie">RFC2109Spec</A>, <A HREF="../../../../../org/apache/commons/httpclient/cookie/RFC2965Spec.html" title="class in org.apache.commons.httpclient.cookie">RFC2965Spec</A></DD>
97
<DT><PRE>public interface <B>CookieSpec</B></DL>
101
Defines the cookie management specification.
102
<p>Cookie management specification must define
104
<li> rules of parsing "Set-Cookie" header
105
<li> rules of validation of parsed cookies
106
<li> formatting of "Cookie" header
108
for a given host, port and path of origin
113
<DT><B>Since:</B></DT>
115
<DT><B>Author:</B></DT>
116
<DD><a href="mailto:oleg@ural.ru">Oleg Kalnichevski</a>, <a href="mailto:jsdever@apache.org">Jeff Dever</a></DD>
121
<!-- =========== FIELD SUMMARY =========== -->
123
<A NAME="field_summary"><!-- --></A>
124
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
125
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
126
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
127
<B>Field Summary</B></FONT></TH>
129
<TR BGCOLOR="white" CLASS="TableRowColor">
130
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
131
<CODE>static <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
132
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#PATH_DELIM">PATH_DELIM</A></B></CODE>
135
Path delimiter</TD>
137
<TR BGCOLOR="white" CLASS="TableRowColor">
138
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
139
<CODE>static char</CODE></FONT></TD>
140
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#PATH_DELIM_CHAR">PATH_DELIM_CHAR</A></B></CODE>
143
Path delimiting charachter</TD>
147
<!-- ========== METHOD SUMMARY =========== -->
149
<A NAME="method_summary"><!-- --></A>
150
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
151
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
152
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
153
<B>Method Summary</B></FONT></TH>
155
<TR BGCOLOR="white" CLASS="TableRowColor">
156
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
157
<CODE> boolean</CODE></FONT></TD>
158
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#domainMatch(java.lang.String, java.lang.String)">domainMatch</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
159
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> domain)</CODE>
162
Performs domain-match as defined by the cookie specification.</TD>
164
<TR BGCOLOR="white" CLASS="TableRowColor">
165
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
166
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
167
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#formatCookie(org.apache.commons.httpclient.Cookie)">formatCookie</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</CODE>
170
Create a <tt>"Cookie"</tt> header value for an array of cookies.</TD>
172
<TR BGCOLOR="white" CLASS="TableRowColor">
173
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
174
<CODE> <A HREF="../../../../../org/apache/commons/httpclient/Header.html" title="class in org.apache.commons.httpclient">Header</A></CODE></FONT></TD>
175
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#formatCookieHeader(org.apache.commons.httpclient.Cookie)">formatCookieHeader</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</CODE>
178
Create a <tt>"Cookie"</tt> Header for single Cookie.</TD>
180
<TR BGCOLOR="white" CLASS="TableRowColor">
181
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
182
<CODE> <A HREF="../../../../../org/apache/commons/httpclient/Header.html" title="class in org.apache.commons.httpclient">Header</A></CODE></FONT></TD>
183
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#formatCookieHeader(org.apache.commons.httpclient.Cookie[])">formatCookieHeader</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] cookies)</CODE>
186
Create a <tt>"Cookie"</tt> Header for an array of Cookies.</TD>
188
<TR BGCOLOR="white" CLASS="TableRowColor">
189
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
190
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD>
191
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#formatCookies(org.apache.commons.httpclient.Cookie[])">formatCookies</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] cookies)</CODE>
194
Create a <tt>"Cookie"</tt> header value for an array of cookies.</TD>
196
<TR BGCOLOR="white" CLASS="TableRowColor">
197
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
198
<CODE> <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A></CODE></FONT></TD>
199
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#getValidDateFormats()">getValidDateFormats</A></B>()</CODE>
202
Returns the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util"><CODE>Collection</CODE></A> of date patterns used for parsing.</TD>
204
<TR BGCOLOR="white" CLASS="TableRowColor">
205
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
206
<CODE> boolean</CODE></FONT></TD>
207
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#match(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie)">match</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
209
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
211
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</CODE>
214
Determines if a Cookie matches a location.</TD>
216
<TR BGCOLOR="white" CLASS="TableRowColor">
217
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
218
<CODE> <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[]</CODE></FONT></TD>
219
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#match(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie[])">match</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
221
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
223
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] cookies)</CODE>
226
Determines which of an array of Cookies matches a location.</TD>
228
<TR BGCOLOR="white" CLASS="TableRowColor">
229
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
230
<CODE> <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[]</CODE></FONT></TD>
231
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#parse(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Header)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
233
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
235
<A HREF="../../../../../org/apache/commons/httpclient/Header.html" title="class in org.apache.commons.httpclient">Header</A> header)</CODE>
238
Parse the <tt>"Set-Cookie"</tt> Header into an array of Cookies.</TD>
240
<TR BGCOLOR="white" CLASS="TableRowColor">
241
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
242
<CODE> <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[]</CODE></FONT></TD>
243
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#parse(java.lang.String, int, java.lang.String, boolean, java.lang.String)">parse</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
245
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
247
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> header)</CODE>
250
Parse the <tt>"Set-Cookie"</tt> header value into Cookie array.</TD>
252
<TR BGCOLOR="white" CLASS="TableRowColor">
253
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
254
<CODE> void</CODE></FONT></TD>
255
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#parseAttribute(org.apache.commons.httpclient.NameValuePair, org.apache.commons.httpclient.Cookie)">parseAttribute</A></B>(<A HREF="../../../../../org/apache/commons/httpclient/NameValuePair.html" title="class in org.apache.commons.httpclient">NameValuePair</A> attribute,
256
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</CODE>
259
Parse the cookie attribute and update the corresponsing Cookie
262
<TR BGCOLOR="white" CLASS="TableRowColor">
263
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
264
<CODE> boolean</CODE></FONT></TD>
265
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#pathMatch(java.lang.String, java.lang.String)">pathMatch</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
266
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> topmostPath)</CODE>
269
Performs path-match as defined by the cookie specification.</TD>
271
<TR BGCOLOR="white" CLASS="TableRowColor">
272
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
273
<CODE> void</CODE></FONT></TD>
274
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#setValidDateFormats(java.util.Collection)">setValidDateFormats</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> datepatterns)</CODE>
277
Sets the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util"><CODE>Collection</CODE></A> of date patterns used for parsing.</TD>
279
<TR BGCOLOR="white" CLASS="TableRowColor">
280
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
281
<CODE> void</CODE></FONT></TD>
282
<TD><CODE><B><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#validate(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie)">validate</A></B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
284
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
286
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</CODE>
289
Validate the cookie according to validation rules defined by the
290
cookie specification.</TD>
296
<!-- ============ FIELD DETAIL =========== -->
298
<A NAME="field_detail"><!-- --></A>
299
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
300
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
301
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
302
<B>Field Detail</B></FONT></TH>
306
<A NAME="PATH_DELIM"><!-- --></A><H3>
309
static final <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PATH_DELIM</B></PRE>
314
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.commons.httpclient.cookie.CookieSpec.PATH_DELIM">Constant Field Values</A></DL>
318
<A NAME="PATH_DELIM_CHAR"><!-- --></A><H3>
321
static final char <B>PATH_DELIM_CHAR</B></PRE>
323
<DD>Path delimiting charachter
329
<!-- ============ METHOD DETAIL ========== -->
331
<A NAME="method_detail"><!-- --></A>
332
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
333
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
334
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
335
<B>Method Detail</B></FONT></TH>
339
<A NAME="parse(java.lang.String, int, java.lang.String, boolean, java.lang.String)"><!-- --></A><H3>
342
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] <B>parse</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
344
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
346
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> header)
347
throws <A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A>,
348
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
350
<DD>Parse the <tt>"Set-Cookie"</tt> header value into Cookie array.
352
<p>This method will not perform the validation of the resultant
353
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient"><CODE>Cookie</CODE></A>s</p>
356
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host which sent the <tt>Set-Cookie</tt> header<DD><CODE>port</CODE> - the port which sent the <tt>Set-Cookie</tt> header<DD><CODE>path</CODE> - the path which sent the <tt>Set-Cookie</tt> header<DD><CODE>secure</CODE> - <tt>true</tt> when the <tt>Set-Cookie</tt> header
357
was received over secure conection<DD><CODE>header</CODE> - the <tt>Set-Cookie</tt> received from the server
358
<DT><B>Returns:</B><DD>an array of <tt>Cookie</tt>s parsed from the Set-Cookie value
360
<DD><CODE><A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A></CODE> - if an exception occurs during parsing
361
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#validate(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie)"><CODE>validate(String, int, String, boolean, Cookie)</CODE></A></DL>
366
<A NAME="parse(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Header)"><!-- --></A><H3>
369
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] <B>parse</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
371
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
373
<A HREF="../../../../../org/apache/commons/httpclient/Header.html" title="class in org.apache.commons.httpclient">Header</A> header)
374
throws <A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A>,
375
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
377
<DD>Parse the <tt>"Set-Cookie"</tt> Header into an array of Cookies.
379
<p>This method will not perform the validation of the resultant
380
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient"><CODE>Cookie</CODE></A>s</p>
383
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host which sent the <tt>Set-Cookie</tt> header<DD><CODE>port</CODE> - the port which sent the <tt>Set-Cookie</tt> header<DD><CODE>path</CODE> - the path which sent the <tt>Set-Cookie</tt> header<DD><CODE>secure</CODE> - <tt>true</tt> when the <tt>Set-Cookie</tt> header
384
was received over secure conection<DD><CODE>header</CODE> - the <tt>Set-Cookie</tt> received from the server
385
<DT><B>Returns:</B><DD>an array of <tt>Cookie</tt>s parsed from the header
387
<DD><CODE><A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A></CODE> - if an exception occurs during parsing
388
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpec.html#validate(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie)"><CODE>validate(String, int, String, boolean, Cookie)</CODE></A></DL>
393
<A NAME="parseAttribute(org.apache.commons.httpclient.NameValuePair, org.apache.commons.httpclient.Cookie)"><!-- --></A><H3>
396
void <B>parseAttribute</B>(<A HREF="../../../../../org/apache/commons/httpclient/NameValuePair.html" title="class in org.apache.commons.httpclient">NameValuePair</A> attribute,
397
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)
398
throws <A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A>,
399
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
401
<DD>Parse the cookie attribute and update the corresponsing Cookie
405
<DT><B>Parameters:</B><DD><CODE>attribute</CODE> - cookie attribute from the <tt>Set-Cookie</tt><DD><CODE>cookie</CODE> - the to be updated
407
<DD><CODE><A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A></CODE> - if an exception occurs during parsing
408
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal</DL>
413
<A NAME="validate(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie)"><!-- --></A><H3>
416
void <B>validate</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
418
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
420
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)
421
throws <A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A>,
422
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
424
<DD>Validate the cookie according to validation rules defined by the
425
cookie specification.
428
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host from which the <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient"><CODE>Cookie</CODE></A> was received<DD><CODE>port</CODE> - the port from which the <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient"><CODE>Cookie</CODE></A> was received<DD><CODE>path</CODE> - the path from which the <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient"><CODE>Cookie</CODE></A> was received<DD><CODE>secure</CODE> - <tt>true</tt> when the <A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient"><CODE>Cookie</CODE></A> was received
429
using a secure connection<DD><CODE>cookie</CODE> - the Cookie to validate
431
<DD><CODE><A HREF="../../../../../org/apache/commons/httpclient/cookie/MalformedCookieException.html" title="class in org.apache.commons.httpclient.cookie">MalformedCookieException</A></CODE> - if the cookie is invalid
432
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal</DL>
437
<A NAME="setValidDateFormats(java.util.Collection)"><!-- --></A><H3>
438
setValidDateFormats</H3>
440
void <B>setValidDateFormats</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> datepatterns)</PRE>
442
<DD>Sets the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util"><CODE>Collection</CODE></A> of date patterns used for parsing. The String patterns must be
443
compatible with <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html" title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A>.
446
<DT><B>Parameters:</B><DD><CODE>datepatterns</CODE> - collection of date patterns</DL>
451
<A NAME="getValidDateFormats()"><!-- --></A><H3>
452
getValidDateFormats</H3>
454
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util">Collection</A> <B>getValidDateFormats</B>()</PRE>
456
<DD>Returns the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/util/Collection.html" title="class or interface in java.util"><CODE>Collection</CODE></A> of date patterns used for parsing. The String patterns are compatible
457
with the <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/text/SimpleDateFormat.html" title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A>.
461
<DT><B>Returns:</B><DD>collection of date patterns</DL>
466
<A NAME="match(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie)"><!-- --></A><H3>
469
boolean <B>match</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
471
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
473
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</PRE>
475
<DD>Determines if a Cookie matches a location.
478
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to which the request is being submitted<DD><CODE>port</CODE> - the port to which the request is being submitted<DD><CODE>path</CODE> - the path to which the request is being submitted<DD><CODE>secure</CODE> - <tt>true</tt> if the request is using a secure connection<DD><CODE>cookie</CODE> - the Cookie to be matched
479
<DT><B>Returns:</B><DD><tt>true</tt> if the cookie should be submitted with a request
480
with given attributes, <tt>false</tt> otherwise.</DL>
485
<A NAME="match(java.lang.String, int, java.lang.String, boolean, org.apache.commons.httpclient.Cookie[])"><!-- --></A><H3>
488
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] <B>match</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
490
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
492
<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] cookies)</PRE>
494
<DD>Determines which of an array of Cookies matches a location.
497
<DT><B>Parameters:</B><DD><CODE>host</CODE> - the host to which the request is being submitted<DD><CODE>port</CODE> - the port to which the request is being submitted
498
(currenlty ignored)<DD><CODE>path</CODE> - the path to which the request is being submitted<DD><CODE>secure</CODE> - <tt>true</tt> if the request is using a secure protocol<DD><CODE>cookies</CODE> - an array of <tt>Cookie</tt>s to be matched
499
<DT><B>Returns:</B><DD><tt>true</tt> if the cookie should be submitted with a request
500
with given attributes, <tt>false</tt> otherwise.</DL>
505
<A NAME="domainMatch(java.lang.String, java.lang.String)"><!-- --></A><H3>
508
boolean <B>domainMatch</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> host,
509
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> domain)</PRE>
511
<DD>Performs domain-match as defined by the cookie specification.
514
<DT><B>Parameters:</B><DD><CODE>host</CODE> - The target host.<DD><CODE>domain</CODE> - The cookie domain attribute.
515
<DT><B>Returns:</B><DD>true if the specified host matches the given domain.<DT><B>Since:</B></DT>
522
<A NAME="pathMatch(java.lang.String, java.lang.String)"><!-- --></A><H3>
525
boolean <B>pathMatch</B>(<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> path,
526
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> topmostPath)</PRE>
528
<DD>Performs path-match as defined by the cookie specification.
531
<DT><B>Parameters:</B><DD><CODE>path</CODE> - The target path.<DD><CODE>topmostPath</CODE> - The cookie path attribute.
532
<DT><B>Returns:</B><DD>true if the paths match<DT><B>Since:</B></DT>
539
<A NAME="formatCookie(org.apache.commons.httpclient.Cookie)"><!-- --></A><H3>
542
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>formatCookie</B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)</PRE>
544
<DD>Create a <tt>"Cookie"</tt> header value for an array of cookies.
547
<DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the cookie to be formatted as string
548
<DT><B>Returns:</B><DD>a string suitable for sending in a <tt>"Cookie"</tt> header.</DL>
553
<A NAME="formatCookies(org.apache.commons.httpclient.Cookie[])"><!-- --></A><H3>
556
<A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>formatCookies</B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] cookies)
557
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
559
<DD>Create a <tt>"Cookie"</tt> header value for an array of cookies.
562
<DT><B>Parameters:</B><DD><CODE>cookies</CODE> - the Cookies to be formatted
563
<DT><B>Returns:</B><DD>a string suitable for sending in a Cookie header.
565
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal</DL>
570
<A NAME="formatCookieHeader(org.apache.commons.httpclient.Cookie[])"><!-- --></A><H3>
571
formatCookieHeader</H3>
573
<A HREF="../../../../../org/apache/commons/httpclient/Header.html" title="class in org.apache.commons.httpclient">Header</A> <B>formatCookieHeader</B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A>[] cookies)
574
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
576
<DD>Create a <tt>"Cookie"</tt> Header for an array of Cookies.
579
<DT><B>Parameters:</B><DD><CODE>cookies</CODE> - the Cookies format into a Cookie header
580
<DT><B>Returns:</B><DD>a Header for the given Cookies.
582
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal</DL>
587
<A NAME="formatCookieHeader(org.apache.commons.httpclient.Cookie)"><!-- --></A><H3>
588
formatCookieHeader</H3>
590
<A HREF="../../../../../org/apache/commons/httpclient/Header.html" title="class in org.apache.commons.httpclient">Header</A> <B>formatCookieHeader</B>(<A HREF="../../../../../org/apache/commons/httpclient/Cookie.html" title="class in org.apache.commons.httpclient">Cookie</A> cookie)
591
throws <A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></PRE>
593
<DD>Create a <tt>"Cookie"</tt> Header for single Cookie.
596
<DT><B>Parameters:</B><DD><CODE>cookie</CODE> - the Cookie format as a <tt>Cookie</tt> header
597
<DT><B>Returns:</B><DD>a Cookie header.
599
<DD><CODE><A HREF="http://java.sun.com/j2se/1.4.2/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - if an input parameter is illegal</DL>
602
<!-- ========= END OF CLASS DATA ========= -->
606
<!-- ======= START OF BOTTOM NAVBAR ====== -->
607
<A NAME="navbar_bottom"><!-- --></A>
608
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
609
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
611
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
612
<A NAME="navbar_bottom_firstrow"><!-- --></A>
613
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
614
<TR ALIGN="center" VALIGN="top">
615
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD>
616
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A> </TD>
617
<TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD>
618
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="class-use/CookieSpec.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD>
619
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD>
620
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD>
621
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD>
622
<TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD>
626
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
632
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
633
<A HREF="../../../../../org/apache/commons/httpclient/cookie/CookiePolicy.html" title="class in org.apache.commons.httpclient.cookie"><B>PREV CLASS</B></A>
634
<A HREF="../../../../../org/apache/commons/httpclient/cookie/CookieSpecBase.html" title="class in org.apache.commons.httpclient.cookie"><B>NEXT CLASS</B></A></FONT></TD>
635
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
636
<A HREF="../../../../../index.html?org/apache/commons/httpclient/cookie/CookieSpec.html" target="_top"><B>FRAMES</B></A>
637
<A HREF="CookieSpec.html" target="_top"><B>NO FRAMES</B></A>
638
<SCRIPT type="text/javascript">
641
document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
646
<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
653
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
654
SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD>
655
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
656
DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD>
659
<A NAME="skip-navbar_bottom"></A>
660
<!-- ======== END OF BOTTOM NAVBAR ======= -->
663
Copyright © 2001-2007 Apache Software Foundation. All Rights Reserved.