⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 archiveutils.html

📁 一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫
💻 HTML
📖 第 1 页 / 共 4 页
字号:
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating arc-style date stamps in the format yyyMMddHHmmss.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#get17DigitDate()">get17DigitDate</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating arc-style date stamps in the format yyyMMddHHmmssSSS.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#get17DigitDate(java.util.Date)">get17DigitDate</A></B>(java.util.Date&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#get17DigitDate(long)">get17DigitDate</A></B>(long&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating arc-style date stamps in the format yyyMMddHHmmssSSS.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#getLog14Date()">getLog14Date</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating log timestamps, in W3C/ISO8601 format, assuming UTC.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#getLog14Date(long)">getLog14Date</A></B>(long&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating log timestamps, in W3C/ISO8601 format, assuming UTC.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#getLog17Date()">getLog17Date</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating log timestamps, in W3C/ISO8601 format, assuming UTC.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#getLog17Date(long)">getLog17Date</A></B>(long&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for creating log timestamps, in W3C/ISO8601 format, assuming UTC.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.Date</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#getSecondsSinceEpoch(java.lang.String)">getSecondsSinceEpoch</A></B>(java.lang.String&nbsp;timestamp)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;void</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#longIntoByteArray(long, byte[], int)">longIntoByteArray</A></B>(long&nbsp;l,                  byte[]&nbsp;array,                  int&nbsp;offset)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Copy the raw bytes of a long into a byte array, starting at the specified offset.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#padTo(int, int)">padTo</A></B>(int&nbsp;i,      int&nbsp;pad)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert an <code>int</code> to a <code>String</code>, and pad it to <code>pad</code> spaces.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#padTo(java.lang.String, int)">padTo</A></B>(java.lang.String&nbsp;s,      int&nbsp;pad)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pad the given <code>String</code> to <code>pad</code> characters wide by pre-pending spaces.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#padTo(java.lang.String, int, char)">padTo</A></B>(java.lang.String&nbsp;s,      int&nbsp;pad,      char&nbsp;padChar)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Pad the given <code>String</code> to <code>pad</code> characters wide by pre-pending <code>padChar</code>.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.Date</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#parse12DigitDate(java.lang.String)">parse12DigitDate</A></B>(java.lang.String&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for parsing arc-style date stamps in the format yyyMMddHHmm.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.Date</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#parse14DigitDate(java.lang.String)">parse14DigitDate</A></B>(java.lang.String&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for parsing arc-style date stamps in the format yyyMMddHHmmss.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.Date</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#parse17DigitDate(java.lang.String)">parse17DigitDate</A></B>(java.lang.String&nbsp;date)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility function for parsing arc-style date stamps in the format yyyMMddHHmmssSSS.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#secondsSinceEpoch(java.lang.String)">secondsSinceEpoch</A></B>(java.lang.String&nbsp;timestamp)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#singleLineReport(org.archive.util.Reporter)">singleLineReport</A></B>(<A HREF="../../../org/archive/util/Reporter.html" title="interface in org.archive.util">Reporter</A>&nbsp;rep)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utility method to get a String singleLineReport from Reporter</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;boolean</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#startsWith(byte[], byte[])">startsWith</A></B>(byte[]&nbsp;array,           byte[]&nbsp;prefix)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Verify that the array begins with the prefix.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.util.Calendar</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#timestamp17ToCalendar(java.lang.String)">timestamp17ToCalendar</A></B>(java.lang.String&nbsp;timestamp17String)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert 17-digit date format timestamps (as found in crawl.log, for example) into a GregorianCalendar object.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#writeReportToString(org.archive.util.Reporter, java.lang.String)">writeReportToString</A></B>(<A HREF="../../../org/archive/util/Reporter.html" title="interface in org.archive.util">Reporter</A>&nbsp;rep,                    java.lang.String&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Compose the requested report into a String.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>static&nbsp;java.lang.String</CODE></FONT></TD><TD><CODE><B><A HREF="../../../org/archive/util/ArchiveUtils.html#zeroPadInteger(int)">zeroPadInteger</A></B>(int&nbsp;i)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD></TR></TABLE>&nbsp;<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.Object</B></TH></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE>clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait</CODE></TD></TR></TABLE>&nbsp;<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="TIMESTAMP12"><!-- --></A><H3>TIMESTAMP12</H3><PRE>public static final java.text.SimpleDateFormat <B>TIMESTAMP12</B></PRE><DL><DD>Arc-style date stamp in the format yyyyMMddHHmm and UTC time zone.<P><DL></DL></DL><HR><A NAME="TIMESTAMP14"><!-- --></A><H3>TIMESTAMP14</H3><PRE>public static final java.text.SimpleDateFormat <B>TIMESTAMP14</B></PRE><DL><DD>Arc-style date stamp in the format yyyyMMddHHmmss and UTC time zone.<P><DL></DL></DL><HR><A NAME="TIMESTAMP17"><!-- --></A><H3>TIMESTAMP17</H3><PRE>public static final java.text.SimpleDateFormat <B>TIMESTAMP17</B></PRE><DL><DD>Arc-style date stamp in the format yyyyMMddHHmmssSSS and UTC time zone.<P><DL></DL></DL><HR><A NAME="TIMESTAMP17ISO8601Z"><!-- --></A><H3>TIMESTAMP17ISO8601Z</H3><PRE>public static final java.text.SimpleDateFormat <B>TIMESTAMP17ISO8601Z</B></PRE><DL><DD>Log-style date stamp in the format yyyy-MM-dd'T'HH:mm:ss.SSS'Z' UTC time zone is assumed.<P><DL></DL></DL><HR><A NAME="TIMESTAMP14ISO8601Z"><!-- --></A><H3>TIMESTAMP14ISO8601Z</H3><PRE>public static final java.text.SimpleDateFormat <B>TIMESTAMP14ISO8601Z</B></PRE><DL><DD>Log-style date stamp in the format yyyy-MM-dd'T'HH:mm:ss'Z' UTC time zone is assumed.<P><DL></DL></DL><HR><A NAME="MAX_INT_CHAR_WIDTH"><!-- --></A><H3>MAX_INT_CHAR_WIDTH</H3><PRE>public static int <B>MAX_INT_CHAR_WIDTH</B></PRE><DL><DL></DL></DL><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_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>Constructor Detail</B></FONT></TH></TR></TABLE><A NAME="ArchiveUtils()"><!-- --></A><H3>ArchiveUtils</H3><PRE>public <B>ArchiveUtils</B>()</PRE><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="get17DigitDate()"><!-- --></A><H3>get17DigitDate</H3><PRE>public static java.lang.String <B>get17DigitDate</B>()</PRE><DL><DD>Utility function for creating arc-style date stamps in the format yyyMMddHHmmssSSS. Date stamps are in the UTC time zone

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -