Edit D:\app\Administrator\product\11.2.0\dbhome_1\owb\lib\int\HTTPClient\doc\api\HTTPClient\Cookie.html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Mon May 07 18:52:24 PDT 2001 --> <TITLE> HTTPClient API: Class Cookie </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="../stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../HTTPClient/Codecs.html"><B>PREV CLASS</B></A> <A HREF="../HTTPClient/Cookie2.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Cookie.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> <FONT SIZE="-1"> HTTPClient</FONT> <BR> Class Cookie</H2> <PRE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">java.lang.Object</A> | +--<B>HTTPClient.Cookie</B> </PRE> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="../HTTPClient/Cookie2.html">Cookie2</A></DD> </DL> <HR> <DL> <DT>public class <B>Cookie</B><DT>extends <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A><DT>implements <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/io/Serializable.html">Serializable</A></DL> <P> This class represents an http cookie as specified in <a href="http://home.netscape.com/newsref/std/cookie_spec.html">Netscape's cookie spec</a>; however, because not even Netscape follows their own spec, and because very few folks out there actually read specs but instead just look whether Netscape accepts their stuff, the Set-Cookie header field parser actually tries to follow what Netscape has implemented, instead of what the spec says. Additionally, the parser it will also recognize the Max-Age parameter from <a href="http://www.ietf.org/rfc/rfc2109.txt">rfc-2109</a>, as that uses the same header field (Set-Cookie). <P>Some notes about how Netscape (4.7) parses: <ul> <LI>Quoting: only quotes around the expires value are recognized as such; quotes around any other value are treated as part of the value. <LI>White space: white space around names and values is ignored <LI>Default path: if no path parameter is given, the path defaults to the path in the request-uri up to, but not including, the last '/'. Note that this is entirely different from what the spec says. <LI>Commas and other delimiters: Netscape just parses until the next ';'. This means will allow commas etc inside values. </ul> <P> <DL> <DT><B>Since: </B><DD>V0.3</DD> <DT><B>Version: </B><DD>0.3-3 06/05/2001</DD> <DT><B>Author: </B><DD>Ronald Tschal?</DD> <DT><B>See Also: </B><DD><A HREF="../serialized-form.html#HTTPClient.Cookie">Serialized Form</A></DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#domain">domain</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html">Date</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#expires">expires</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#name">name</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#path">path</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#secure">secure</A></B></CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#value">value</A></B></CODE> <BR> </TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected </CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#Cookie(HTTPClient.RoRequest)">Cookie</A></B>(<A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</CODE> <BR> Use <code>parse()</code> to create cookies.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> </CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#Cookie(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Date, boolean)">Cookie</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> name, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> value, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> domain, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> path, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html">Date</A> expires, boolean secure)</CODE> <BR> Create a cookie.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#discard()">discard</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#equals(java.lang.Object)">equals</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> obj)</CODE> <BR> Two cookies match if the name, path and domain match.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html">Date</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#expires()">expires</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#getDomain()">getDomain</A></B>()</CODE> <BR> Return the domain this cookie is valid in.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#getName()">getName</A></B>()</CODE> <BR> Return the name of this cookie.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#getPath()">getPath</A></B>()</CODE> <BR> Return the path this cookie is associated with.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#getValue()">getValue</A></B>()</CODE> <BR> Return the value of this cookie.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#hasExpired()">hasExpired</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> int</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#hashCode()">hashCode</A></B>()</CODE> <BR> Hash up name, path and domain into new hash.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#isSecure()">isSecure</A></B>()</CODE> <BR> Return whether this cookie should only be sent over secure connections.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected static <A HREF="../HTTPClient/Cookie.html">Cookie</A>[]</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#parse(java.lang.String, HTTPClient.RoRequest)">parse</A></B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> set_cookie, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</CODE> <BR> Parses the Set-Cookie header into an array of Cookies.</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#sendWith(HTTPClient.RoRequest)">sendWith</A></B>(<A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#toExternalForm()">toExternalForm</A></B>()</CODE> <BR> </TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A></CODE></FONT></TD> <TD><CODE><B><A HREF="../HTTPClient/Cookie.html#toString()">toString</A></B>()</CODE> <BR> Create a string containing all the cookie fields.</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class java.lang.<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#clone()">clone</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#finalize()">finalize</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#getClass()">getClass</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#notify()">notify</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#notifyAll()">notifyAll</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait()">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait(long)">wait</A>, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#wait(long, int)">wait</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="name"><!-- --></A><H3> name</H3> <PRE> protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>name</B></PRE> <DL> </DL> <HR> <A NAME="value"><!-- --></A><H3> value</H3> <PRE> protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>value</B></PRE> <DL> </DL> <HR> <A NAME="expires"><!-- --></A><H3> expires</H3> <PRE> protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html">Date</A> <B>expires</B></PRE> <DL> </DL> <HR> <A NAME="domain"><!-- --></A><H3> domain</H3> <PRE> protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>domain</B></PRE> <DL> </DL> <HR> <A NAME="path"><!-- --></A><H3> path</H3> <PRE> protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>path</B></PRE> <DL> </DL> <HR> <A NAME="secure"><!-- --></A><H3> secure</H3> <PRE> protected boolean <B>secure</B></PRE> <DL> </DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="Cookie(java.lang.String, java.lang.String, java.lang.String, java.lang.String, java.util.Date, boolean)"><!-- --></A><H3> Cookie</H3> <PRE> public <B>Cookie</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> name, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> value, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> domain, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> path, <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html">Date</A> expires, boolean secure)</PRE> <DL> <DD>Create a cookie.<DD><DL> <DT><B>Parameters:</B><DD><CODE>name</CODE> - the cookie name<DD><CODE>value</CODE> - the cookie value<DD><CODE>domain</CODE> - the host this cookie will be sent to<DD><CODE>path</CODE> - the path prefix for which this cookie will be sent<DD><CODE>epxires</CODE> - the Date this cookie expires, null if at end of session<DD><CODE>secure</CODE> - if true this cookie will only be over secure connections<DT><B>Throws:</B><DD>NullPointerException - if <var>name</var>, <var>value</var>, <var>domain</var>, or <var>path</var> is null<DT><B>Since: </B><DD>V0.3-1</DD> </DL> </DD> </DL> <HR> <A NAME="Cookie(HTTPClient.RoRequest)"><!-- --></A><H3> Cookie</H3> <PRE> protected <B>Cookie</B>(<A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</PRE> <DL> <DD>Use <code>parse()</code> to create cookies.<DD><DL> <DT><B>See Also: </B><DD><A HREF="../HTTPClient/Cookie.html#parse(java.lang.String, HTTPClient.RoRequest)"><CODE>parse(java.lang.String, HTTPClient.RoRequest)</CODE></A></DL> </DD> </DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="parse(java.lang.String, HTTPClient.RoRequest)"><!-- --></A><H3> parse</H3> <PRE> protected static <A HREF="../HTTPClient/Cookie.html">Cookie</A>[] <B>parse</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> set_cookie, <A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req) throws <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/net/ProtocolException.html">ProtocolException</A></PRE> <DL> <DD>Parses the Set-Cookie header into an array of Cookies.<DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>set_cookie</CODE> - the Set-Cookie header received from the server<DD><CODE>req</CODE> - the request used<DT><B>Returns:</B><DD>an array of Cookies as parsed from the Set-Cookie header<DT><B>Throws:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/net/ProtocolException.html">ProtocolException</A> - if an error occurs during parsing</DL> </DD> </DL> <HR> <A NAME="getName()"><!-- --></A><H3> getName</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getName</B>()</PRE> <DL> <DD>Return the name of this cookie.<DD><DL> </DL> </DD> </DL> <HR> <A NAME="getValue()"><!-- --></A><H3> getValue</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getValue</B>()</PRE> <DL> <DD>Return the value of this cookie.<DD><DL> </DL> </DD> </DL> <HR> <A NAME="expires()"><!-- --></A><H3> expires</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/util/Date.html">Date</A> <B>expires</B>()</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>the expiry date of this cookie, or null if none set.</DL> </DD> </DL> <HR> <A NAME="discard()"><!-- --></A><H3> discard</H3> <PRE> public boolean <B>discard</B>()</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if the cookie should be discarded at the end of the session; false otherwise</DL> </DD> </DL> <HR> <A NAME="getDomain()"><!-- --></A><H3> getDomain</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getDomain</B>()</PRE> <DL> <DD>Return the domain this cookie is valid in.<DD><DL> </DL> </DD> </DL> <HR> <A NAME="getPath()"><!-- --></A><H3> getPath</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>getPath</B>()</PRE> <DL> <DD>Return the path this cookie is associated with.<DD><DL> </DL> </DD> </DL> <HR> <A NAME="isSecure()"><!-- --></A><H3> isSecure</H3> <PRE> public boolean <B>isSecure</B>()</PRE> <DL> <DD>Return whether this cookie should only be sent over secure connections.<DD><DL> </DL> </DD> </DL> <HR> <A NAME="hasExpired()"><!-- --></A><H3> hasExpired</H3> <PRE> public boolean <B>hasExpired</B>()</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>true if this cookie has expired</DL> </DD> </DL> <HR> <A NAME="sendWith(HTTPClient.RoRequest)"><!-- --></A><H3> sendWith</H3> <PRE> protected boolean <B>sendWith</B>(<A HREF="../HTTPClient/RoRequest.html">RoRequest</A> req)</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>req</CODE> - the request to be sent<DT><B>Returns:</B><DD>true if this cookie should be sent with the request</DL> </DD> </DL> <HR> <A NAME="hashCode()"><!-- --></A><H3> hashCode</H3> <PRE> public int <B>hashCode</B>()</PRE> <DL> <DD>Hash up name, path and domain into new hash.<DD><DL> <DT><B>Overrides:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#hashCode()">hashCode</A> in class <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></DL> </DD> </DL> <HR> <A NAME="equals(java.lang.Object)"><!-- --></A><H3> equals</H3> <PRE> public boolean <B>equals</B>(<A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A> obj)</PRE> <DL> <DD>Two cookies match if the name, path and domain match.<DD><DL> <DT><B>Overrides:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#equals(java.lang.Object)">equals</A> in class <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></DL> </DD> </DL> <HR> <A NAME="toExternalForm()"><!-- --></A><H3> toExternalForm</H3> <PRE> protected <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>toExternalForm</B>()</PRE> <DL> <DD><DL> </DL> </DD> <DD><DL> <DT><B>Returns:</B><DD>a string suitable for sending in a Cookie header.</DL> </DD> </DL> <HR> <A NAME="toString()"><!-- --></A><H3> toString</H3> <PRE> public <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/String.html">String</A> <B>toString</B>()</PRE> <DL> <DD>Create a string containing all the cookie fields. The format is that used in the Set-Cookie header.<DD><DL> <DT><B>Overrides:</B><DD><A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html#toString()">toString</A> in class <A HREF="http://java.sun.com/products/jdk/1.2/docs/api/java/lang/Object.html">Object</A></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A> </TD> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../HTTPClient/Codecs.html"><B>PREV CLASS</B></A> <A HREF="../HTTPClient/Cookie2.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="../index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Cookie.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML>
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de