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

📄 archiveutils.html

📁 一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫一个开源的网页爬虫
💻 HTML
📖 第 1 页 / 共 4 页
字号:
<PRE>public static java.lang.String <B>padTo</B>(int&nbsp;i,                                     int&nbsp;pad)</PRE><DL><DD>Convert an <code>int</code> to a <code>String</code>, and pad it to <code>pad</code> spaces.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>i</CODE> - the int<DD><CODE>pad</CODE> - the width to pad to.<DT><B>Returns:</B><DD>String w/ padding.</DL></DD></DL><HR><A NAME="padTo(java.lang.String, int)"><!-- --></A><H3>padTo</H3><PRE>public static java.lang.String <B>padTo</B>(java.lang.String&nbsp;s,                                     int&nbsp;pad)</PRE><DL><DD>Pad the given <code>String</code> to <code>pad</code> characters wide by pre-pending spaces.  <code>s</code> should not be <code>null</code>. If <code>s</code> is already wider than <code>pad</code> no change is done.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the String to pad<DD><CODE>pad</CODE> - the width to pad to.<DT><B>Returns:</B><DD>String w/ padding.</DL></DD></DL><HR><A NAME="padTo(java.lang.String, int, char)"><!-- --></A><H3>padTo</H3><PRE>public static java.lang.String <B>padTo</B>(java.lang.String&nbsp;s,                                     int&nbsp;pad,                                     char&nbsp;padChar)</PRE><DL><DD>Pad the given <code>String</code> to <code>pad</code> characters wide by pre-pending <code>padChar</code>.  <code>s</code> should not be <code>null</code>. If <code>s</code> is already wider than <code>pad</code> no change is done.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>s</CODE> - the String to pad<DD><CODE>pad</CODE> - the width to pad to.<DD><CODE>padChar</CODE> - The pad character to use.<DT><B>Returns:</B><DD>String w/ padding.</DL></DD></DL><HR><A NAME="byteArrayEquals(byte[], byte[])"><!-- --></A><H3>byteArrayEquals</H3><PRE>public static boolean <B>byteArrayEquals</B>(byte[]&nbsp;lhs,                                      byte[]&nbsp;rhs)</PRE><DL><DD>check that two byte arrays are equal.  They may be <code>null</code>.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>lhs</CODE> - a byte array<DD><CODE>rhs</CODE> - another byte array.<DT><B>Returns:</B><DD><code>true</code> if they are both equal (or both <code>null</code>)</DL></DD></DL><HR><A NAME="doubleToString(double, int)"><!-- --></A><H3>doubleToString</H3><PRE>public static java.lang.String <B>doubleToString</B>(double&nbsp;val,                                              int&nbsp;precision)</PRE><DL><DD>Converts a double to a string.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>val</CODE> - The double to convert<DD><CODE>precision</CODE> - How many characters to include after '.'<DT><B>Returns:</B><DD>the double as a string.</DL></DD></DL><HR><A NAME="formatBytesForDisplay(long)"><!-- --></A><H3>formatBytesForDisplay</H3><PRE>public static java.lang.String <B>formatBytesForDisplay</B>(long&nbsp;amount)</PRE><DL><DD>Takes an amount of bytes and formats it for display. This involves converting it to Kb, Mb or Gb if the amount is enough to qualify for the next level. <p> Displays as bytes (B): 0-1023 Displays as kilobytes (KB): 1024 - 2097151 (~2Mb) Displays as megabytes (MB): 2097152 - 4294967295 (~4Gb) Displays as gigabytes (GB): 4294967296 - infinity <p> Negative numbers will be returned as '0 B'. <p> All values will be approximated down (i.e. 2047 bytes are 1 KB)<P><DD><DL><DT><B>Parameters:</B><DD><CODE>amount</CODE> - the amount of bytes<DT><B>Returns:</B><DD>A string containing the amount, properly formated.</DL></DD></DL><HR><A NAME="formatMillisecondsToConventional(long)"><!-- --></A><H3>formatMillisecondsToConventional</H3><PRE>public static java.lang.String <B>formatMillisecondsToConventional</B>(long&nbsp;time)</PRE><DL><DD>Convert milliseconds value to a human-readable duration<P><DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - <DT><B>Returns:</B><DD>Human readable string version of passed <code>time</code></DL></DD></DL><HR><A NAME="formatMillisecondsToConventional(long, boolean)"><!-- --></A><H3>formatMillisecondsToConventional</H3><PRE>public static java.lang.String <B>formatMillisecondsToConventional</B>(long&nbsp;time,                                                                boolean&nbsp;toMs)</PRE><DL><DD>Convert milliseconds value to a human-readable duration<P><DD><DL><DT><B>Parameters:</B><DD><CODE>time</CODE> - <DD><CODE>toMs</CODE> - whether to print to the ms<DT><B>Returns:</B><DD>Human readable string version of passed <code>time</code></DL></DD></DL><HR><A NAME="classnameBasedUID(java.lang.Class, int)"><!-- --></A><H3>classnameBasedUID</H3><PRE>public static long <B>classnameBasedUID</B>(java.lang.Class&nbsp;class1,                                     int&nbsp;version)</PRE><DL><DD>Generate a long UID based on the given class and version number. Using this instead of the default will assume serialization compatibility across class changes unless version number is intentionally bumped.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>class1</CODE> - <DD><CODE>version</CODE> - <DT><B>Returns:</B><DD>UID based off class and version number.</DL></DD></DL><HR><A NAME="longIntoByteArray(long, byte[], int)"><!-- --></A><H3>longIntoByteArray</H3><PRE>public static void <B>longIntoByteArray</B>(long&nbsp;l,                                     byte[]&nbsp;array,                                     int&nbsp;offset)</PRE><DL><DD>Copy the raw bytes of a long into a byte array, starting at the specified offset.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>l</CODE> - <DD><CODE>array</CODE> - <DD><CODE>offset</CODE> - </DL></DD></DL><HR><A NAME="byteArrayIntoLong(byte[])"><!-- --></A><H3>byteArrayIntoLong</H3><PRE>public static long <B>byteArrayIntoLong</B>(byte[]&nbsp;bytearray)</PRE><DL><DD><DL></DL></DD></DL><HR><A NAME="byteArrayIntoLong(byte[], int)"><!-- --></A><H3>byteArrayIntoLong</H3><PRE>public static long <B>byteArrayIntoLong</B>(byte[]&nbsp;bytearray,                                     int&nbsp;offset)</PRE><DL><DD>Byte array into long.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>bytearray</CODE> - Array to convert to a long.<DD><CODE>offset</CODE> - Offset into array at which we start decoding the long.<DT><B>Returns:</B><DD>Long made of the bytes of <code>array</code> beginning at offset <code>offset</code>.<DT><B>See Also:</B><DD><A HREF="../../../org/archive/util/ArchiveUtils.html#longIntoByteArray(long, byte[], int)"><CODE>longIntoByteArray(long, byte[], int)</CODE></A></DL></DD></DL><HR><A NAME="addImpliedHttpIfNecessary(java.lang.String)"><!-- --></A><H3>addImpliedHttpIfNecessary</H3><PRE>public static java.lang.String <B>addImpliedHttpIfNecessary</B>(java.lang.String&nbsp;u)</PRE><DL><DD>Given a string that may be a plain host or host/path (without URI scheme), add an implied http:// if necessary.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>u</CODE> - string to evaluate<DT><B>Returns:</B><DD>string with http:// added if no scheme already present</DL></DD></DL><HR><A NAME="startsWith(byte[], byte[])"><!-- --></A><H3>startsWith</H3><PRE>public static boolean <B>startsWith</B>(byte[]&nbsp;array,                                 byte[]&nbsp;prefix)</PRE><DL><DD>Verify that the array begins with the prefix.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>array</CODE> - <DD><CODE>prefix</CODE> - <DT><B>Returns:</B><DD>true if array is identical to prefix for the first prefix.length positions</DL></DD></DL><HR><A NAME="singleLineReport(org.archive.util.Reporter)"><!-- --></A><H3>singleLineReport</H3><PRE>public static java.lang.String <B>singleLineReport</B>(<A HREF="../../../org/archive/util/Reporter.html" title="interface in org.archive.util">Reporter</A>&nbsp;rep)</PRE><DL><DD>Utility method to get a String singleLineReport from Reporter<P><DD><DL><DT><B>Parameters:</B><DD><CODE>rep</CODE> - Reporter to get singleLineReport from<DT><B>Returns:</B><DD>String of report</DL></DD></DL><HR><A NAME="writeReportToString(org.archive.util.Reporter, java.lang.String)"><!-- --></A><H3>writeReportToString</H3><PRE>public static java.lang.String <B>writeReportToString</B>(<A HREF="../../../org/archive/util/Reporter.html" title="interface in org.archive.util">Reporter</A>&nbsp;rep,                                                   java.lang.String&nbsp;name)</PRE><DL><DD>Compose the requested report into a String. DANGEROUS IF REPORT CAN BE LARGE.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>rep</CODE> - Reported<DD><CODE>name</CODE> - String name of report to compose<DT><B>Returns:</B><DD>String of report</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>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="class-use/ArchiveUtils.html"><FONT CLASS="NavBarFont1"><B>Use</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>  </TR></TABLE></TD><TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM></EM></TD></TR><TR><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">&nbsp;<A HREF="../../../org/archive/util/AbstractLongFPSet.html" title="class in org.archive.util"><B>PREV CLASS</B></A>&nbsp;&nbsp;<A HREF="../../../org/archive/util/Base32.html" title="class in org.archive.util"><B>NEXT CLASS</B></A></FONT></TD><TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">  <A HREF="../../../index.html?org/archive/util/ArchiveUtils.html" target="_top"><B>FRAMES</B></A>  &nbsp;&nbsp;<A HREF="ArchiveUtils.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;&nbsp;<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:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD><TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD></TR></TABLE><A NAME="skip-navbar_bottom"></A><!-- ======== END OF BOTTOM NAVBAR ======= --><HR>Copyright &copy; 2003-2006 Internet Archive. All Rights Reserved.</BODY></HTML>

⌨️ 快捷键说明

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