| <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
| <!--NewPage--> |
| <HTML> |
| <HEAD> |
| <!-- Generated by javadoc (build 1.5.0_22) on Sun Oct 21 11:03:13 GMT+01:00 2012 --> |
| <META http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
| <TITLE> |
| DateUtils (HttpComponents Client 4.2.2 API) |
| </TITLE> |
| |
| <META NAME="keywords" CONTENT="org.apache.http.impl.cookie.DateUtils class"> |
| |
| <LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style"> |
| |
| <SCRIPT type="text/javascript"> |
| function windowTitle() |
| { |
| parent.document.title="DateUtils (HttpComponents Client 4.2.2 API)"; |
| } |
| </SCRIPT> |
| <NOSCRIPT> |
| </NOSCRIPT> |
| |
| </HEAD> |
| |
| <BODY BGCOLOR="white" onload="windowTitle();"> |
| |
| |
| <!-- ========= START OF TOP NAVBAR ======= --> |
| <A NAME="navbar_top"><!-- --></A> |
| <A HREF="#skip-navbar_top" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_top_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="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="class-use/DateUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="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="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/http/impl/cookie/IgnoreSpec.html" title="class in org.apache.http.impl.cookie"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/http/impl/cookie/DateUtils.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="DateUtils.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_top"></A> |
| <!-- ========= END OF TOP NAVBAR ========= --> |
| |
| <HR> |
| <!-- ======== START OF CLASS DATA ======== --> |
| <H2> |
| <FONT SIZE="-1"> |
| org.apache.http.impl.cookie</FONT> |
| <BR> |
| Class DateUtils</H2> |
| <PRE> |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">java.lang.Object</A> |
| <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>org.apache.http.impl.cookie.DateUtils</B> |
| </PRE> |
| <HR> |
| <DL> |
| <DT><PRE><FONT SIZE="-1"><A HREF="http://hc.apache.org/httpcomponents-core-ga/httpcore/apidocs/org/apache/http/annotation/Immutable.html" title="class or interface in org.apache.http.annotation">@Immutable</A> |
| </FONT>public final class <B>DateUtils</B><DT>extends <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></DL> |
| </PRE> |
| |
| <P> |
| A utility class for parsing and formatting HTTP dates as used in cookies and |
| other headers. This class handles dates as defined by RFC 2616 section |
| 3.3.1 as well as some other common non-standard formats. |
| <P> |
| |
| <P> |
| <DL> |
| <DT><B>Since:</B></DT> |
| <DD>4.0</DD> |
| </DL> |
| <HR> |
| |
| <P> |
| <!-- =========== FIELD SUMMARY =========== --> |
| |
| <A NAME="field_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Field Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/TimeZone.html" title="class or interface in java.util">TimeZone</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#GMT">GMT</A></B></CODE> |
| |
| <BR> |
| </TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#PATTERN_ASCTIME">PATTERN_ASCTIME</A></B></CODE> |
| |
| <BR> |
| Date format pattern used to parse HTTP date headers in ANSI C |
| <code>asctime()</code> format.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#PATTERN_RFC1036">PATTERN_RFC1036</A></B></CODE> |
| |
| <BR> |
| Date format pattern used to parse HTTP date headers in RFC 1036 format.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#PATTERN_RFC1123">PATTERN_RFC1123</A></B></CODE> |
| |
| <BR> |
| Date format pattern used to parse HTTP date headers in RFC 1123 format.</TD> |
| </TR> |
| </TABLE> |
| |
| <!-- ========== METHOD SUMMARY =========== --> |
| |
| <A NAME="method_summary"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2"> |
| <B>Method Summary</B></FONT></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static void</CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#clearThreadLocal()">clearThreadLocal</A></B>()</CODE> |
| |
| <BR> |
| Clears thread-local variable containing <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/text/DateFormat.html" title="class or interface in java.text"><CODE>DateFormat</CODE></A> cache.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#formatDate(java.util.Date)">formatDate</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date)</CODE> |
| |
| <BR> |
| Formats the given date according to the RFC 1123 pattern.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#formatDate(java.util.Date, java.lang.String)">formatDate</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> pattern)</CODE> |
| |
| <BR> |
| Formats the given date according to the specified pattern.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#parseDate(java.lang.String)">parseDate</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateValue)</CODE> |
| |
| <BR> |
| Parses a date value.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#parseDate(java.lang.String, java.lang.String[])">parseDate</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateValue, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] dateFormats)</CODE> |
| |
| <BR> |
| Parses the date value using the given date formats.</TD> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> |
| <CODE>static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A></CODE></FONT></TD> |
| <TD><CODE><B><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#parseDate(java.lang.String, java.lang.String[], java.util.Date)">parseDate</A></B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateValue, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] dateFormats, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> startDate)</CODE> |
| |
| <BR> |
| Parses the date value using the given date formats.</TD> |
| </TR> |
| </TABLE> |
| <A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> |
| <TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TH> |
| </TR> |
| <TR BGCOLOR="white" CLASS="TableRowColor"> |
| <TD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD> |
| </TR> |
| </TABLE> |
| |
| <P> |
| |
| <!-- ============ FIELD DETAIL =========== --> |
| |
| <A NAME="field_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Field Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="PATTERN_RFC1123"><!-- --></A><H3> |
| PATTERN_RFC1123</H3> |
| <PRE> |
| public static final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PATTERN_RFC1123</B></PRE> |
| <DL> |
| <DD>Date format pattern used to parse HTTP date headers in RFC 1123 format. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.http.impl.cookie.DateUtils.PATTERN_RFC1123">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="PATTERN_RFC1036"><!-- --></A><H3> |
| PATTERN_RFC1036</H3> |
| <PRE> |
| public static final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PATTERN_RFC1036</B></PRE> |
| <DL> |
| <DD>Date format pattern used to parse HTTP date headers in RFC 1036 format. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.http.impl.cookie.DateUtils.PATTERN_RFC1036">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="PATTERN_ASCTIME"><!-- --></A><H3> |
| PATTERN_ASCTIME</H3> |
| <PRE> |
| public static final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>PATTERN_ASCTIME</B></PRE> |
| <DL> |
| <DD>Date format pattern used to parse HTTP date headers in ANSI C |
| <code>asctime()</code> format. |
| <P> |
| <DL> |
| <DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#org.apache.http.impl.cookie.DateUtils.PATTERN_ASCTIME">Constant Field Values</A></DL> |
| </DL> |
| <HR> |
| |
| <A NAME="GMT"><!-- --></A><H3> |
| GMT</H3> |
| <PRE> |
| public static final <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/TimeZone.html" title="class or interface in java.util">TimeZone</A> <B>GMT</B></PRE> |
| <DL> |
| <DL> |
| </DL> |
| </DL> |
| |
| <!-- ============ METHOD DETAIL ========== --> |
| |
| <A NAME="method_detail"><!-- --></A> |
| <TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""> |
| <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> |
| <TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2"> |
| <B>Method Detail</B></FONT></TH> |
| </TR> |
| </TABLE> |
| |
| <A NAME="parseDate(java.lang.String)"><!-- --></A><H3> |
| parseDate</H3> |
| <PRE> |
| public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> <B>parseDate</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateValue) |
| throws <A HREF="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie">DateParseException</A></PRE> |
| <DL> |
| <DD>Parses a date value. The formats used for parsing the date value are retrieved from |
| the default http params. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>dateValue</CODE> - the date value to parse |
| <DT><B>Returns:</B><DD>the parsed date |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie">DateParseException</A></CODE> - if the value could not be parsed using any of the |
| supported date formats</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parseDate(java.lang.String, java.lang.String[])"><!-- --></A><H3> |
| parseDate</H3> |
| <PRE> |
| public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> <B>parseDate</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateValue, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] dateFormats) |
| throws <A HREF="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie">DateParseException</A></PRE> |
| <DL> |
| <DD>Parses the date value using the given date formats. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>dateValue</CODE> - the date value to parse<DD><CODE>dateFormats</CODE> - the date formats to use |
| <DT><B>Returns:</B><DD>the parsed date |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie">DateParseException</A></CODE> - if none of the dataFormats could parse the dateValue</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="parseDate(java.lang.String, java.lang.String[], java.util.Date)"><!-- --></A><H3> |
| parseDate</H3> |
| <PRE> |
| public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> <B>parseDate</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> dateValue, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] dateFormats, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> startDate) |
| throws <A HREF="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie">DateParseException</A></PRE> |
| <DL> |
| <DD>Parses the date value using the given date formats. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>dateValue</CODE> - the date value to parse<DD><CODE>dateFormats</CODE> - the date formats to use<DD><CODE>startDate</CODE> - During parsing, two digit years will be placed in the range |
| <code>startDate</code> to <code>startDate + 100 years</code>. This value may |
| be <code>null</code>. When <code>null</code> is given as a parameter, year |
| <code>2000</code> will be used. |
| <DT><B>Returns:</B><DD>the parsed date |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie">DateParseException</A></CODE> - if none of the dataFormats could parse the dateValue</DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="formatDate(java.util.Date)"><!-- --></A><H3> |
| formatDate</H3> |
| <PRE> |
| public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>formatDate</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date)</PRE> |
| <DL> |
| <DD>Formats the given date according to the RFC 1123 pattern. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>date</CODE> - The date to format. |
| <DT><B>Returns:</B><DD>An RFC 1123 formatted date string.<DT><B>See Also:</B><DD><A HREF="../../../../../org/apache/http/impl/cookie/DateUtils.html#PATTERN_RFC1123"><CODE>PATTERN_RFC1123</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="formatDate(java.util.Date, java.lang.String)"><!-- --></A><H3> |
| formatDate</H3> |
| <PRE> |
| public static <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> <B>formatDate</B>(<A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/util/Date.html" title="class or interface in java.util">Date</A> date, |
| <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A> pattern)</PRE> |
| <DL> |
| <DD>Formats the given date according to the specified pattern. The pattern |
| must conform to that used by the <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html" title="class or interface in java.text"><CODE>simple date |
| format</CODE></A> class. |
| <P> |
| <DD><DL> |
| <DT><B>Parameters:</B><DD><CODE>date</CODE> - The date to format.<DD><CODE>pattern</CODE> - The pattern to use for formatting the date. |
| <DT><B>Returns:</B><DD>A formatted date string. |
| <DT><B>Throws:</B> |
| <DD><CODE><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/lang/IllegalArgumentException.html" title="class or interface in java.lang">IllegalArgumentException</A></CODE> - If the given date pattern is invalid.<DT><B>See Also:</B><DD><A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html" title="class or interface in java.text"><CODE>SimpleDateFormat</CODE></A></DL> |
| </DD> |
| </DL> |
| <HR> |
| |
| <A NAME="clearThreadLocal()"><!-- --></A><H3> |
| clearThreadLocal</H3> |
| <PRE> |
| public static void <B>clearThreadLocal</B>()</PRE> |
| <DL> |
| <DD>Clears thread-local variable containing <A HREF="http://download.oracle.com/javase/1.5.0/docs/api/java/text/DateFormat.html" title="class or interface in java.text"><CODE>DateFormat</CODE></A> cache. |
| <P> |
| <DD><DL> |
| </DL> |
| </DD> |
| </DL> |
| <!-- ========= END OF CLASS DATA ========= --> |
| <HR> |
| |
| |
| <!-- ======= START OF BOTTOM NAVBAR ====== --> |
| <A NAME="navbar_bottom"><!-- --></A> |
| <A HREF="#skip-navbar_bottom" title="Skip navigation links"></A> |
| <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY=""> |
| <TR> |
| <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> |
| <A NAME="navbar_bottom_firstrow"><!-- --></A> |
| <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY=""> |
| <TR ALIGN="center" VALIGN="top"> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-summary.html"><FONT CLASS="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="class-use/DateUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> |
| <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="../../../../../help-doc.html"><FONT CLASS="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="../../../../../org/apache/http/impl/cookie/DateParseException.html" title="class in org.apache.http.impl.cookie"><B>PREV CLASS</B></A> |
| <A HREF="../../../../../org/apache/http/impl/cookie/IgnoreSpec.html" title="class in org.apache.http.impl.cookie"><B>NEXT CLASS</B></A></FONT></TD> |
| <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> |
| <A HREF="../../../../../index.html?org/apache/http/impl/cookie/DateUtils.html" target="_top"><B>FRAMES</B></A> |
| <A HREF="DateUtils.html" target="_top"><B>NO FRAMES</B></A> |
| <SCRIPT type="text/javascript"> |
| <!-- |
| if(window==top) { |
| document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>'); |
| } |
| //--> |
| </SCRIPT> |
| <NOSCRIPT> |
| <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A> |
| </NOSCRIPT> |
| |
| |
| </FONT></TD> |
| </TR> |
| <TR> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| SUMMARY: NESTED | <A HREF="#field_summary">FIELD</A> | CONSTR | <A HREF="#method_summary">METHOD</A></FONT></TD> |
| <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> |
| DETAIL: <A HREF="#field_detail">FIELD</A> | CONSTR | <A HREF="#method_detail">METHOD</A></FONT></TD> |
| </TR> |
| </TABLE> |
| <A NAME="skip-navbar_bottom"></A> |
| <!-- ======== END OF BOTTOM NAVBAR ======= --> |
| |
| <HR> |
| Copyright © 1999-2012 <a href="http://www.apache.org/">The Apache Software Foundation</a>. All Rights Reserved. |
| </BODY> |
| </HTML> |