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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? ramdirectory.java

?? lucene-2.4.0 是一個(gè)全文收索的工具包
?? JAVA
字號(hào):
package org.apache.lucene.store;/** * Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements.  See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License.  You may obtain a copy of the License at * *     http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */import java.io.IOException;import java.io.FileNotFoundException;import java.io.File;import java.io.Serializable;import java.util.HashMap;import java.util.Iterator;import java.util.Set;/** * A memory-resident {@link Directory} implementation.  Locking * implementation is by default the {@link SingleInstanceLockFactory} * but can be changed with {@link #setLockFactory}. * * @version $Id: RAMDirectory.java 675485 2008-07-10 09:27:44Z mikemccand $ */public class RAMDirectory extends Directory implements Serializable {  private static final long serialVersionUID = 1l;  HashMap fileMap = new HashMap();  long sizeInBytes = 0;    // *****  // Lock acquisition sequence:  RAMDirectory, then RAMFile  // *****  /** Constructs an empty {@link Directory}. */  public RAMDirectory() {    setLockFactory(new SingleInstanceLockFactory());  }  /**   * Creates a new <code>RAMDirectory</code> instance from a different   * <code>Directory</code> implementation.  This can be used to load   * a disk-based index into memory.   * <P>   * This should be used only with indices that can fit into memory.   * <P>   * Note that the resulting <code>RAMDirectory</code> instance is fully   * independent from the original <code>Directory</code> (it is a   * complete copy).  Any subsequent changes to the   * original <code>Directory</code> will not be visible in the   * <code>RAMDirectory</code> instance.   *   * @param dir a <code>Directory</code> value   * @exception IOException if an error occurs   */  public RAMDirectory(Directory dir) throws IOException {    this(dir, false);  }    private RAMDirectory(Directory dir, boolean closeDir) throws IOException {    this();    Directory.copy(dir, this, closeDir);  }  /**   * Creates a new <code>RAMDirectory</code> instance from the {@link FSDirectory}.   *   * @param dir a <code>File</code> specifying the index directory   *   * @see #RAMDirectory(Directory)   */  public RAMDirectory(File dir) throws IOException {    this(FSDirectory.getDirectory(dir), true);  }  /**   * Creates a new <code>RAMDirectory</code> instance from the {@link FSDirectory}.   *   * @param dir a <code>String</code> specifying the full index directory path   *   * @see #RAMDirectory(Directory)   */  public RAMDirectory(String dir) throws IOException {    this(FSDirectory.getDirectory(dir), true);  }  /** Returns an array of strings, one for each file in the directory. */  public synchronized final String[] list() {    ensureOpen();    Set fileNames = fileMap.keySet();    String[] result = new String[fileNames.size()];    int i = 0;    Iterator it = fileNames.iterator();    while (it.hasNext())      result[i++] = (String)it.next();    return result;  }  /** Returns true iff the named file exists in this directory. */  public final boolean fileExists(String name) {    ensureOpen();    RAMFile file;    synchronized (this) {      file = (RAMFile)fileMap.get(name);    }    return file != null;  }  /** Returns the time the named file was last modified.   * @throws IOException if the file does not exist   */  public final long fileModified(String name) throws IOException {    ensureOpen();    RAMFile file;    synchronized (this) {      file = (RAMFile)fileMap.get(name);    }    if (file==null)      throw new FileNotFoundException(name);    return file.getLastModified();  }  /** Set the modified time of an existing file to now.   * @throws IOException if the file does not exist   */  public void touchFile(String name) throws IOException {    ensureOpen();    RAMFile file;    synchronized (this) {      file = (RAMFile)fileMap.get(name);    }    if (file==null)      throw new FileNotFoundException(name);        long ts2, ts1 = System.currentTimeMillis();    do {      try {        Thread.sleep(0, 1);      } catch (InterruptedException e) {}      ts2 = System.currentTimeMillis();    } while(ts1 == ts2);        file.setLastModified(ts2);  }  /** Returns the length in bytes of a file in the directory.   * @throws IOException if the file does not exist   */  public final long fileLength(String name) throws IOException {    ensureOpen();    RAMFile file;    synchronized (this) {      file = (RAMFile)fileMap.get(name);    }    if (file==null)      throw new FileNotFoundException(name);    return file.getLength();  }    /** Return total size in bytes of all files in this   * directory.  This is currently quantized to   * RAMOutputStream.BUFFER_SIZE. */  public synchronized final long sizeInBytes() {    ensureOpen();    return sizeInBytes;  }    /** Removes an existing file in the directory.   * @throws IOException if the file does not exist   */  public synchronized void deleteFile(String name) throws IOException {    ensureOpen();    RAMFile file = (RAMFile)fileMap.get(name);    if (file!=null) {        fileMap.remove(name);        file.directory = null;        sizeInBytes -= file.sizeInBytes;       // updates to RAMFile.sizeInBytes synchronized on directory    } else      throw new FileNotFoundException(name);  }  /** Renames an existing file in the directory.   * @throws FileNotFoundException if from does not exist   * @deprecated   */  public synchronized final void renameFile(String from, String to) throws IOException {    ensureOpen();    RAMFile fromFile = (RAMFile)fileMap.get(from);    if (fromFile==null)      throw new FileNotFoundException(from);    RAMFile toFile = (RAMFile)fileMap.get(to);    if (toFile!=null) {      sizeInBytes -= toFile.sizeInBytes;       // updates to RAMFile.sizeInBytes synchronized on directory      toFile.directory = null;    }    fileMap.remove(from);    fileMap.put(to, fromFile);  }  /** Creates a new, empty file in the directory with the given name. Returns a stream writing this file. */  public IndexOutput createOutput(String name) throws IOException {    ensureOpen();    RAMFile file = new RAMFile(this);    synchronized (this) {      RAMFile existing = (RAMFile)fileMap.get(name);      if (existing!=null) {        sizeInBytes -= existing.sizeInBytes;        existing.directory = null;      }      fileMap.put(name, file);    }    return new RAMOutputStream(file);  }  /** Returns a stream reading an existing file. */  public IndexInput openInput(String name) throws IOException {    ensureOpen();    RAMFile file;    synchronized (this) {      file = (RAMFile)fileMap.get(name);    }    if (file == null)      throw new FileNotFoundException(name);    return new RAMInputStream(file);  }  /** Closes the store to future operations, releasing associated memory. */  public void close() {    isOpen = false;    fileMap = null;  }}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
精久久久久久久久久久| 综合电影一区二区三区| 秋霞成人午夜伦在线观看| 91精品综合久久久久久| 日本最新不卡在线| 欧美大片在线观看| 国产v日产∨综合v精品视频| 欧美国产精品专区| 成人av影院在线| 亚洲精品视频免费看| 欧美日本一区二区三区| 免费高清在线视频一区·| 26uuu色噜噜精品一区二区| www.欧美精品一二区| 亚洲成人高清在线| 久久久久久久久99精品| 91美女片黄在线观看| 五月激情综合色| 国产午夜精品一区二区三区视频| 99re在线精品| 免费在线成人网| 亚洲欧洲日韩在线| 欧美日韩一卡二卡| 国产一区二区三区免费播放 | 亚洲大型综合色站| 精品国产91乱码一区二区三区| 成人丝袜视频网| 亚洲高清中文字幕| 欧美极品xxx| 51精品视频一区二区三区| 成人一区二区三区在线观看| 亚洲国产视频一区| 国产性做久久久久久| 91黄色免费网站| 91麻豆产精品久久久久久| 日韩精品乱码av一区二区| 日本一区二区视频在线| 欧美福利视频导航| 一本色道久久加勒比精品| 蜜桃精品视频在线观看| 亚洲色图.com| 久久久久久免费网| 7777精品久久久大香线蕉| 大桥未久av一区二区三区中文| 香蕉成人伊视频在线观看| 国产精品久久久久久久久免费相片| 欧美在线观看视频一区二区三区| 国产一区二区三区高清播放| 亚洲国产精品久久不卡毛片| 国产精品久99| 久久精品人人做人人综合| 欧美久久久久中文字幕| av影院午夜一区| 国产一区二区在线视频| 日韩精彩视频在线观看| 亚洲综合在线免费观看| 国产精品天干天干在线综合| 欧美mv和日韩mv的网站| 日韩一区二区在线观看视频播放| 色综合色狠狠天天综合色| 国产不卡高清在线观看视频| 精品在线观看视频| 秋霞影院一区二区| 亚洲一区二区三区在线看| 成人欧美一区二区三区小说| 久久综合色鬼综合色| 欧美一区二区美女| 欧美人妖巨大在线| 欧美性xxxxxxxx| 色偷偷一区二区三区| www.激情成人| 波波电影院一区二区三区| 丁香亚洲综合激情啪啪综合| 国产美女一区二区三区| 激情都市一区二区| 精品一区二区三区不卡| 韩国精品主播一区二区在线观看| 美国精品在线观看| 国产真实乱子伦精品视频| 麻豆成人久久精品二区三区红| 午夜精品久久久久久| 日日夜夜精品视频天天综合网| 亚洲国产一区二区三区| 亚洲福中文字幕伊人影院| 亚洲va欧美va人人爽午夜| 亚洲高清一区二区三区| 日本不卡一区二区三区高清视频| 天天操天天色综合| 免费高清在线视频一区·| 精品一区二区在线观看| 国产一区二区0| 波多野结衣亚洲| 日本福利一区二区| 欧美日本视频在线| 欧美一级生活片| 2020国产精品| 中文字幕在线不卡| 亚洲国产视频a| 蜜桃一区二区三区在线| 国产成人综合视频| 一本一道久久a久久精品| 欧美综合欧美视频| 日韩欧美国产午夜精品| 久久久不卡影院| 亚洲欧美日韩国产手机在线| 午夜av区久久| 高清国产一区二区| 91国在线观看| 日韩欧美在线网站| 国产精品色婷婷| 午夜精品福利一区二区三区av| 亚洲图片自拍偷拍| 精品国产网站在线观看| 久久人人97超碰com| 欧美国产精品劲爆| 精品福利在线导航| 国产欧美一二三区| 亚洲精品视频在线观看免费| 美女免费视频一区二区| 99re视频精品| 欧美成人video| 自拍av一区二区三区| 免费国产亚洲视频| 99精品国产视频| 日韩欧美国产不卡| 亚洲天堂精品视频| 国产精品一级在线| 欧美日本韩国一区二区三区视频| 国产日韩欧美高清在线| 亚洲大型综合色站| av中文字幕一区| 日韩午夜三级在线| 亚洲综合精品久久| 成人性色生活片| 欧美成人官网二区| 亚洲国产精品影院| www.色综合.com| 国产亚洲一区二区三区四区| 日韩精品高清不卡| 一本久久精品一区二区| 日本一区免费视频| 国产最新精品免费| 日韩三级av在线播放| 亚洲国产视频一区| 色视频一区二区| 中文字幕欧美一区| 岛国一区二区三区| 亚洲精品高清视频在线观看| 国产黄色成人av| 日韩一区二区三区四区| 午夜av区久久| 欧美日韩一区二区在线观看| 亚洲欧美偷拍另类a∨色屁股| 国产剧情一区二区| 日韩欧美一级精品久久| 亚洲成av人片观看| 在线免费观看一区| 亚洲日本护士毛茸茸| 99这里只有久久精品视频| 久久亚洲影视婷婷| 麻豆91精品视频| 制服丝袜亚洲色图| 日本不卡123| 日韩一区二区免费视频| 五月婷婷久久综合| 欧美欧美欧美欧美| 日韩经典一区二区| 日韩欧美色综合网站| 麻豆成人久久精品二区三区红| 日韩免费视频一区二区| 蜜桃av一区二区在线观看| 日韩欧美的一区二区| 美女一区二区在线观看| 日韩欧美久久久| 国产精品18久久久久久久网站| 久久精品一区四区| 大桥未久av一区二区三区中文| 中文字幕免费在线观看视频一区| 国产精品99久久久| 国产精品拍天天在线| 色呦呦国产精品| 亚洲国产精品嫩草影院| 91麻豆精品国产自产在线| 另类调教123区| 久久婷婷成人综合色| 成人免费av网站| 亚洲精品videosex极品| 欧美精品一二三| 狠狠久久亚洲欧美| 国产精品无人区| 欧美综合一区二区| 理论片日本一区| 欧美国产日韩一二三区| 在线观看视频一区二区| 蜜桃免费网站一区二区三区| 欧美极品美女视频| 欧美色电影在线| 国产精品资源在线看| 亚洲色图都市小说| 日韩视频一区在线观看|