亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? checkpointutils.html

?? 網絡爬蟲開源代碼
?? HTML
字號:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"><head><meta http-equiv="content-type" content="text/html; charset=UTF-8" /><title>CheckpointUtils xref</title><link type="text/css" rel="stylesheet" href="../../../../stylesheet.css" /></head><body><div id="overview"><a href="../../../../../apidocs/org/archive/crawler/util/CheckpointUtils.html">View Javadoc</a></div><pre><a name="1" href="#1">1</a>   <em class="comment">/*<em class="comment"> CheckpointUtils</em></em><a name="2" href="#2">2</a>   <em class="comment"> *</em><a name="3" href="#3">3</a>   <em class="comment"> * $Id: CheckpointUtils.java 4658 2006-09-25 22:40:19Z paul_jack $</em><a name="4" href="#4">4</a>   <em class="comment"> *</em><a name="5" href="#5">5</a>   <em class="comment"> * Created on December 16, 2005.</em><a name="6" href="#6">6</a>   <em class="comment"> *</em><a name="7" href="#7">7</a>   <em class="comment"> * Copyright (C) 2005 Internet Archive.</em><a name="8" href="#8">8</a>   <em class="comment"> *</em><a name="9" href="#9">9</a>   <em class="comment"> * This file is part of the Heritrix web crawler (crawler.archive.org).</em><a name="10" href="#10">10</a>  <em class="comment"> *</em><a name="11" href="#11">11</a>  <em class="comment"> * Heritrix is free software; you can redistribute it and/or modify</em><a name="12" href="#12">12</a>  <em class="comment"> * it under the terms of the GNU Lesser Public License as published by</em><a name="13" href="#13">13</a>  <em class="comment"> * the Free Software Foundation; either version 2.1 of the License, or</em><a name="14" href="#14">14</a>  <em class="comment"> * any later version.</em><a name="15" href="#15">15</a>  <em class="comment"> *</em><a name="16" href="#16">16</a>  <em class="comment"> * Heritrix is distributed in the hope that it will be useful,</em><a name="17" href="#17">17</a>  <em class="comment"> * but WITHOUT ANY WARRANTY; without even the implied warranty of</em><a name="18" href="#18">18</a>  <em class="comment"> * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the</em><a name="19" href="#19">19</a>  <em class="comment"> * GNU Lesser Public License for more details.</em><a name="20" href="#20">20</a>  <em class="comment"> *</em><a name="21" href="#21">21</a>  <em class="comment"> * You should have received a copy of the GNU Lesser Public License</em><a name="22" href="#22">22</a>  <em class="comment"> * along with Heritrix; if not, write to the Free Software</em><a name="23" href="#23">23</a>  <em class="comment"> * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA</em><a name="24" href="#24">24</a>  <em class="comment"> */</em><a name="25" href="#25">25</a>  <strong>package</strong> <a href="../../../../org/archive/crawler/util/package-summary.html">org.archive.crawler.util</a>;<a name="26" href="#26">26</a>  <a name="27" href="#27">27</a>  <strong>import</strong> java.io.File;<a name="28" href="#28">28</a>  <strong>import</strong> java.io.FileInputStream;<a name="29" href="#29">29</a>  <strong>import</strong> java.io.FileNotFoundException;<a name="30" href="#30">30</a>  <strong>import</strong> java.io.FileOutputStream;<a name="31" href="#31">31</a>  <strong>import</strong> java.io.FilenameFilter;<a name="32" href="#32">32</a>  <strong>import</strong> java.io.IOException;<a name="33" href="#33">33</a>  <strong>import</strong> java.io.ObjectInputStream;<a name="34" href="#34">34</a>  <strong>import</strong> java.io.ObjectOutputStream;<a name="35" href="#35">35</a>  <a name="36" href="#36">36</a>  <em>/**<em>*</em></em><a name="37" href="#37">37</a>  <em> * Utilities useful checkpointing.</em><a name="38" href="#38">38</a>  <em> * @author stack</em><a name="39" href="#39">39</a>  <em> * @version $Date: 2006-09-25 22:40:19 +0000 (Mon, 25 Sep 2006) $ $Revision: 4658 $</em><a name="40" href="#40">40</a>  <em> */</em><a name="41" href="#41">41</a>  <strong>public</strong> <strong>class</strong> <a href="../../../../org/archive/crawler/util/CheckpointUtils.html">CheckpointUtils</a> {<a name="42" href="#42">42</a>      <strong>public</strong> <strong>static</strong> <strong>final</strong> String SERIALIZED_CLASS_SUFFIX = <span class="string">".serialized"</span>;<a name="43" href="#43">43</a>      <a name="44" href="#44">44</a>      <strong>public</strong> <strong>static</strong> File getBdbSubDirectory(File checkpointDir) {<a name="45" href="#45">45</a>          <strong>return</strong> <strong>new</strong> File(checkpointDir, <span class="string">"bdbje-logs"</span>);<a name="46" href="#46">46</a>      }<a name="47" href="#47">47</a>      <a name="48" href="#48">48</a>      <strong>public</strong> <strong>static</strong> File getClassCheckpointFile(File checkpointDir,<a name="49" href="#49">49</a>              <strong>final</strong> String suffix, Class c) {<a name="50" href="#50">50</a>          <strong>return</strong> <strong>new</strong> File(checkpointDir, getClassCheckpointFilename(c, suffix));<a name="51" href="#51">51</a>      }<a name="52" href="#52">52</a>      <a name="53" href="#53">53</a>      <strong>public</strong> <strong>static</strong> File getClassCheckpointFile(File checkpointDir, Class c) {<a name="54" href="#54">54</a>          <strong>return</strong> <strong>new</strong> File(checkpointDir, getClassCheckpointFilename(c, <strong>null</strong>));<a name="55" href="#55">55</a>      }<a name="56" href="#56">56</a>      <a name="57" href="#57">57</a>      <strong>public</strong> <strong>static</strong> String getClassCheckpointFilename(<strong>final</strong> Class c) {<a name="58" href="#58">58</a>          <strong>return</strong> getClassCheckpointFilename(c, <strong>null</strong>);<a name="59" href="#59">59</a>      }<a name="60" href="#60">60</a>      <a name="61" href="#61">61</a>      <strong>public</strong> <strong>static</strong> String getClassCheckpointFilename(<strong>final</strong> Class c,<a name="62" href="#62">62</a>              <strong>final</strong> String suffix) {<a name="63" href="#63">63</a>          <strong>return</strong> c.getName() + ((suffix == <strong>null</strong>)? <span class="string">""</span>: <span class="string">"."</span> + suffix) +<a name="64" href="#64">64</a>              SERIALIZED_CLASS_SUFFIX;<a name="65" href="#65">65</a>      }<a name="66" href="#66">66</a>      <a name="67" href="#67">67</a>      <em>/**<em>*</em></em><a name="68" href="#68">68</a>  <em>     * Utility function to serialize an object to a file in current checkpoint</em><a name="69" href="#69">69</a>  <em>     * dir. Facilities</em><a name="70" href="#70">70</a>  <em>     * to store related files alongside the serialized object in a directory</em><a name="71" href="#71">71</a>  <em>     * named with a &lt;code>.auxillary&lt;/code> suffix.</em><a name="72" href="#72">72</a>  <em>     *</em><a name="73" href="#73">73</a>  <em>     * @param o Object to serialize.</em><a name="74" href="#74">74</a>  <em>     * @param dir Directory to serialize into.</em><a name="75" href="#75">75</a>  <em>     * @throws IOException</em><a name="76" href="#76">76</a>  <em>     */</em><a name="77" href="#77">77</a>      <strong>public</strong> <strong>static</strong> <strong>void</strong> writeObjectToFile(<strong>final</strong> Object o, <strong>final</strong> File dir)<a name="78" href="#78">78</a>      throws IOException {<a name="79" href="#79">79</a>          writeObjectToFile(o, <strong>null</strong>, dir);<a name="80" href="#80">80</a>      }<a name="81" href="#81">81</a>          <a name="82" href="#82">82</a>      <strong>public</strong> <strong>static</strong> <strong>void</strong> writeObjectToFile(<strong>final</strong> Object o, <strong>final</strong> String suffix,<a name="83" href="#83">83</a>              <strong>final</strong> File dir)<a name="84" href="#84">84</a>      throws IOException {<a name="85" href="#85">85</a>          dir.mkdirs();<a name="86" href="#86">86</a>          ObjectOutputStream out = <strong>new</strong> ObjectOutputStream(<a name="87" href="#87">87</a>              <strong>new</strong> FileOutputStream(getClassCheckpointFile(dir, suffix,<a name="88" href="#88">88</a>                  o.getClass())));<a name="89" href="#89">89</a>          <strong>try</strong> {<a name="90" href="#90">90</a>              out.writeObject(o);<a name="91" href="#91">91</a>          } <strong>finally</strong> {<a name="92" href="#92">92</a>              out.close();<a name="93" href="#93">93</a>          }<a name="94" href="#94">94</a>      }<a name="95" href="#95">95</a>      <a name="96" href="#96">96</a>      <strong>public</strong> <strong>static</strong> &lt;T> T readObjectFromFile(<strong>final</strong> Class&lt;T> c, <strong>final</strong> File dir)<a name="97" href="#97">97</a>      throws FileNotFoundException, IOException, ClassNotFoundException {<a name="98" href="#98">98</a>          <strong>return</strong> readObjectFromFile(c, <strong>null</strong>, dir);<a name="99" href="#99">99</a>      }<a name="100" href="#100">100</a>     <a name="101" href="#101">101</a>     <strong>public</strong> <strong>static</strong> &lt;T> T readObjectFromFile(<strong>final</strong> Class&lt;T> c, <strong>final</strong> String suffix,<a name="102" href="#102">102</a>             <strong>final</strong> File dir)<a name="103" href="#103">103</a>     throws FileNotFoundException, IOException, ClassNotFoundException {<a name="104" href="#104">104</a>         ObjectInputStream in = <strong>new</strong> ObjectInputStream(<a name="105" href="#105">105</a>             <strong>new</strong> FileInputStream(getClassCheckpointFile(dir, suffix, c)));<a name="106" href="#106">106</a>         T o = <strong>null</strong>;<a name="107" href="#107">107</a>         <strong>try</strong> {<a name="108" href="#108">108</a>             o = c.<strong>cast</strong>(in.readObject());<a name="109" href="#109">109</a>         } <strong>finally</strong> {<a name="110" href="#110">110</a>             in.close();<a name="111" href="#111">111</a>         }<a name="112" href="#112">112</a>         <strong>return</strong> o;<a name="113" href="#113">113</a>     }<a name="114" href="#114">114</a> <a name="115" href="#115">115</a>     <em>/**<em>*</em></em><a name="116" href="#116">116</a> <em>     * @return Instance of filename filter that will let through files ending</em><a name="117" href="#117">117</a> <em>     * in '.jdb' (i.e. bdb je log files).</em><a name="118" href="#118">118</a> <em>     */</em><a name="119" href="#119">119</a>     <strong>public</strong> <strong>static</strong> FilenameFilter getJeLogsFilter() {<a name="120" href="#120">120</a>         <strong>return</strong> <strong>new</strong> FilenameFilter() {<a name="121" href="#121">121</a>             <strong>public</strong> <strong>boolean</strong> accept(File dir, String name) {<a name="122" href="#122">122</a>                 <strong>return</strong> name != <strong>null</strong> &amp;&amp; name.toLowerCase().endsWith(<span class="string">".jdb"</span>);<a name="123" href="#123">123</a>             }<a name="124" href="#124">124</a>         };<a name="125" href="#125">125</a>     }<a name="126" href="#126">126</a> }</pre><hr/><div id="footer">This page was automatically generated by <a href="http://maven.apache.org/">Maven</a></div></body></html>

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
欧美va天堂va视频va在线| 亚洲国产成人午夜在线一区| 91麻豆精品国产91久久久久| 日韩欧美一卡二卡| 国产清纯白嫩初高生在线观看91| 国产精品每日更新在线播放网址| 亚洲精品国产无套在线观| 婷婷久久综合九色国产成人| 国产精品一二二区| 成人国产精品免费网站| 欧美日韩国产高清一区二区三区| 欧美白人最猛性xxxxx69交| 国产精品久久影院| 日韩av电影一区| 成人午夜视频在线| 3atv在线一区二区三区| 国产欧美精品一区二区色综合朱莉 | 3d动漫精品啪啪一区二区竹菊| 国产日产欧产精品推荐色| 亚洲蜜臀av乱码久久精品蜜桃| 美美哒免费高清在线观看视频一区二区| 一区二区三区四区精品在线视频 | 欧亚一区二区三区| 精品国产凹凸成av人导航| 亚洲天堂免费看| 午夜欧美一区二区三区在线播放| 成人综合在线网站| 欧美xxxxxxxx| 亚洲一二三区不卡| 风间由美一区二区三区在线观看 | 91影院在线观看| 88在线观看91蜜桃国自产| 国产精品久久久久久久久动漫| 免费成人在线视频观看| 日本高清不卡一区| 国产午夜精品美女毛片视频| 七七婷婷婷婷精品国产| 91成人在线精品| 亚洲国产成人自拍| 国内一区二区在线| 欧美电影免费提供在线观看| 亚洲第一久久影院| 99久久婷婷国产精品综合| 久久精品视频在线看| 日本不卡不码高清免费观看| 欧美综合天天夜夜久久| 国产精品初高中害羞小美女文| 国产一区视频网站| 日韩精品一区二区三区四区 | 欧美三级在线播放| 一区二区在线看| 9久草视频在线视频精品| 国产视频一区在线播放| 另类成人小视频在线| 91精品久久久久久久久99蜜臂| 亚洲观看高清完整版在线观看 | 在线播放国产精品二区一二区四区 | 国产自产高清不卡| 秋霞电影一区二区| 欧美剧情片在线观看| 国产一区二三区好的| 久久久久青草大香线综合精品| 91麻豆精品国产91久久久资源速度| 爽好多水快深点欧美视频| 亚洲精品在线观| 国产在线视视频有精品| www.综合网.com| 欧美国产日韩在线观看| 成人h动漫精品一区二区| 亚洲国产高清在线观看视频| 99久久精品费精品国产一区二区| 国产精品视频一二三区| 91丨porny丨最新| 夜夜精品浪潮av一区二区三区| 欧美日韩免费一区二区三区| 男男视频亚洲欧美| 久久亚洲私人国产精品va媚药| 国产乱子伦视频一区二区三区| 中文一区在线播放| 91网站最新地址| 亚洲国产你懂的| 日韩欧美区一区二| 国产不卡在线视频| 亚洲精品一二三区| 精品国产乱码久久久久久夜甘婷婷| 国产一区二区三区在线观看精品| 亚洲欧洲av另类| 欧美高清视频在线高清观看mv色露露十八| 天堂成人国产精品一区| 日韩女优制服丝袜电影| 国产91露脸合集magnet| 亚洲欧美偷拍三级| 制服丝袜一区二区三区| 极品美女销魂一区二区三区 | 亚洲人成网站在线| 欧美色精品在线视频| 不卡的电影网站| 一区二区三区 在线观看视频| 日本精品一区二区三区高清| 日韩主播视频在线| 久久精品亚洲麻豆av一区二区| 91久久精品午夜一区二区| 毛片一区二区三区| 亚洲欧美另类久久久精品| 678五月天丁香亚洲综合网| 国产成人免费视频| 偷拍亚洲欧洲综合| 欧美国产日本韩| 欧美一级在线视频| 色婷婷久久久综合中文字幕| 国内精品自线一区二区三区视频| 亚洲欧美一区二区三区极速播放| 日韩精品一区国产麻豆| 欧美在线视频你懂得| 国产成人精品综合在线观看| 午夜精品久久久久久久久| 中文无字幕一区二区三区| 欧美日韩国产小视频在线观看| 国产不卡在线一区| 麻豆91小视频| 亚洲香肠在线观看| 中文字幕乱码一区二区免费| 日韩久久久久久| 欧美视频一二三区| 99久久精品国产一区| 国产精品小仙女| 美女视频网站久久| 亚洲一区在线观看免费观看电影高清| 日本一区二区三区dvd视频在线 | 国产黄人亚洲片| 麻豆91在线播放免费| 亚洲午夜激情av| 亚洲色图都市小说| 国产精品水嫩水嫩| 国产欧美日韩在线| www国产精品av| 欧美成人乱码一区二区三区| 欧美精品久久天天躁| 欧美日韩精品欧美日韩精品| 欧美影院一区二区| 欧美日韩视频第一区| 欧洲av在线精品| 欧美日韩你懂得| 欧美人牲a欧美精品| 欧美人与性动xxxx| 欧美久久一二区| 777亚洲妇女| 3751色影院一区二区三区| 9191国产精品| 欧美变态tickling挠脚心| 日韩免费高清视频| 亚洲精品在线三区| 国产精品欧美一级免费| 国产精品女主播在线观看| 自拍偷拍亚洲激情| 亚洲欧洲av另类| 亚洲人成在线观看一区二区| 国产网红主播福利一区二区| 欧美激情综合在线| 国产精品三级电影| 国产精品久久久久久久久免费相片 | 亚洲影院久久精品| 亚洲天堂a在线| 中文字幕一区二区三区四区不卡 | 久久精品夜夜夜夜久久| 久久亚洲一级片| 精品88久久久久88久久久| 欧美一区二区成人| 91精品国产乱码久久蜜臀| 欧美三级日韩在线| 99国产精品99久久久久久| 在线观看国产91| 欧美性感一区二区三区| 欧美日韩情趣电影| 欧美一区二区三区四区五区| 777午夜精品视频在线播放| 欧美精品高清视频| 欧美三级中文字| 久久欧美一区二区| 国产精品久久久久精k8| 中文字幕一区二区三区在线观看 | 99久久er热在这里只有精品15| 狠狠色丁香婷婷综合| 国产宾馆实践打屁股91| 丁香婷婷综合激情五月色| 91在线视频免费观看| av在线播放一区二区三区| 91捆绑美女网站| 欧美色大人视频| 日韩精品一区二区三区在线观看| 69av一区二区三区| 成人欧美一区二区三区小说| 亚洲高清免费观看| 精品一区二区免费| 丁香桃色午夜亚洲一区二区三区| 成人污视频在线观看| 欧美天天综合网| 26uuu色噜噜精品一区二区| 国产精品久久久久久久久动漫| 亚洲电影一区二区三区|