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

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

?? fieldsreader.java

?? lucene-2.4.0 是一個全文收索的工具包
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
      data = b;    } else {      data = fieldsStream.readString();    }          doc.add(new FieldForMerge(data, fi, binary, compressed, tokenize));  }    private void addField(Document doc, FieldInfo fi, boolean binary, boolean compressed, boolean tokenize) throws CorruptIndexException, IOException {    //we have a binary stored field, and it may be compressed    if (binary) {      int toRead = fieldsStream.readVInt();      final byte[] b = new byte[toRead];      fieldsStream.readBytes(b, 0, b.length);      if (compressed)        doc.add(new Field(fi.name, uncompress(b), Field.Store.COMPRESS));      else        doc.add(new Field(fi.name, b, Field.Store.YES));    } else {      Field.Store store = Field.Store.YES;      Field.Index index = getIndexType(fi, tokenize);      Field.TermVector termVector = getTermVectorType(fi);      Fieldable f;      if (compressed) {        store = Field.Store.COMPRESS;        int toRead = fieldsStream.readVInt();        final byte[] b = new byte[toRead];        fieldsStream.readBytes(b, 0, b.length);        f = new Field(fi.name,      // field name                new String(uncompress(b), "UTF-8"), // uncompress the value and add as string                store,                index,                termVector);        f.setOmitNorms(fi.omitNorms);      } else {        f = new Field(fi.name,     // name                fieldsStream.readString(), // read value                store,                index,                termVector);        f.setOmitNorms(fi.omitNorms);      }      doc.add(f);    }  }    // Add the size of field as a byte[] containing the 4 bytes of the integer byte size (high order byte first; char = 2 bytes)  // Read just the size -- caller must skip the field content to continue reading fields  // Return the size in bytes or chars, depending on field type  private int addFieldSize(Document doc, FieldInfo fi, boolean binary, boolean compressed) throws IOException {    int size = fieldsStream.readVInt(), bytesize = binary || compressed ? size : 2*size;    byte[] sizebytes = new byte[4];    sizebytes[0] = (byte) (bytesize>>>24);    sizebytes[1] = (byte) (bytesize>>>16);    sizebytes[2] = (byte) (bytesize>>> 8);    sizebytes[3] = (byte)  bytesize      ;    doc.add(new Field(fi.name, sizebytes, Field.Store.YES));    return size;  }  private Field.TermVector getTermVectorType(FieldInfo fi) {    Field.TermVector termVector = null;    if (fi.storeTermVector) {      if (fi.storeOffsetWithTermVector) {        if (fi.storePositionWithTermVector) {          termVector = Field.TermVector.WITH_POSITIONS_OFFSETS;        } else {          termVector = Field.TermVector.WITH_OFFSETS;        }      } else if (fi.storePositionWithTermVector) {        termVector = Field.TermVector.WITH_POSITIONS;      } else {        termVector = Field.TermVector.YES;      }    } else {      termVector = Field.TermVector.NO;    }    return termVector;  }  private Field.Index getIndexType(FieldInfo fi, boolean tokenize) {    Field.Index index;    if (fi.isIndexed && tokenize)      index = Field.Index.ANALYZED;    else if (fi.isIndexed && !tokenize)      index = Field.Index.NOT_ANALYZED;    else      index = Field.Index.NO;    return index;  }  /**   * A Lazy implementation of Fieldable that differs loading of fields until asked for, instead of when the Document is   * loaded.   */  private class LazyField extends AbstractField implements Fieldable {    private int toRead;    private long pointer;    public LazyField(String name, Field.Store store, int toRead, long pointer, boolean isBinary) {      super(name, store, Field.Index.NO, Field.TermVector.NO);      this.toRead = toRead;      this.pointer = pointer;      this.isBinary = isBinary;      lazy = true;    }    public LazyField(String name, Field.Store store, Field.Index index, Field.TermVector termVector, int toRead, long pointer, boolean isBinary) {      super(name, store, index, termVector);      this.toRead = toRead;      this.pointer = pointer;      this.isBinary = isBinary;      lazy = true;    }    private IndexInput getFieldStream() {      IndexInput localFieldsStream = (IndexInput) fieldsStreamTL.get();      if (localFieldsStream == null) {        localFieldsStream = (IndexInput) cloneableFieldsStream.clone();        fieldsStreamTL.set(localFieldsStream);      }      return localFieldsStream;    }    /** The value of the field in Binary, or null.  If null, the Reader value,     * String value, or TokenStream value is used. Exactly one of stringValue(),      * readerValue(), binaryValue(), and tokenStreamValue() must be set. */    public byte[] binaryValue() {      return getBinaryValue(null);    }    /** The value of the field as a Reader, or null.  If null, the String value,     * binary value, or TokenStream value is used.  Exactly one of stringValue(),      * readerValue(), binaryValue(), and tokenStreamValue() must be set. */    public Reader readerValue() {      ensureOpen();      return null;    }    /** The value of the field as a TokenStream, or null.  If null, the Reader value,     * String value, or binary value is used. Exactly one of stringValue(),      * readerValue(), binaryValue(), and tokenStreamValue() must be set. */    public TokenStream tokenStreamValue() {      ensureOpen();      return null;    }    /** The value of the field as a String, or null.  If null, the Reader value,     * binary value, or TokenStream value is used.  Exactly one of stringValue(),      * readerValue(), binaryValue(), and tokenStreamValue() must be set. */    public String stringValue() {      ensureOpen();      if (isBinary)        return null;      else {        if (fieldsData == null) {          IndexInput localFieldsStream = getFieldStream();          try {            localFieldsStream.seek(pointer);            if (isCompressed) {              final byte[] b = new byte[toRead];              localFieldsStream.readBytes(b, 0, b.length);              fieldsData = new String(uncompress(b), "UTF-8");            } else {              if (format >= FieldsWriter.FORMAT_VERSION_UTF8_LENGTH_IN_BYTES) {                byte[] bytes = new byte[toRead];                localFieldsStream.readBytes(bytes, 0, toRead);                fieldsData = new String(bytes, "UTF-8");              } else {                //read in chars b/c we already know the length we need to read                char[] chars = new char[toRead];                localFieldsStream.readChars(chars, 0, toRead);                fieldsData = new String(chars);              }            }          } catch (IOException e) {            throw new FieldReaderException(e);          }        }        return (String) fieldsData;      }    }    public long getPointer() {      ensureOpen();      return pointer;    }    public void setPointer(long pointer) {      ensureOpen();      this.pointer = pointer;    }    public int getToRead() {      ensureOpen();      return toRead;    }    public void setToRead(int toRead) {      ensureOpen();      this.toRead = toRead;    }    public byte[] getBinaryValue(byte[] result) {      ensureOpen();      if (isBinary) {        if (fieldsData == null) {          // Allocate new buffer if result is null or too small          final byte[] b;          if (result == null || result.length < toRead)            b = new byte[toRead];          else            b = result;             IndexInput localFieldsStream = getFieldStream();          // Throw this IOException since IndexReader.document does so anyway, so probably not that big of a change for people          // since they are already handling this exception when getting the document          try {            localFieldsStream.seek(pointer);            localFieldsStream.readBytes(b, 0, toRead);            if (isCompressed == true) {              fieldsData = uncompress(b);            } else {              fieldsData = b;            }          } catch (IOException e) {            throw new FieldReaderException(e);          }          binaryOffset = 0;          binaryLength = toRead;        }        return (byte[]) fieldsData;      } else        return null;         }  }    private final byte[] uncompress(final byte[] input)          throws CorruptIndexException, IOException {    // Create an expandable byte array to hold the decompressed data    ByteArrayOutputStream bos = new ByteArrayOutputStream(input.length);    Inflater decompressor = new Inflater();    try {      decompressor.setInput(input);      // Decompress the data      byte[] buf = new byte[1024];      while (!decompressor.finished()) {        try {          int count = decompressor.inflate(buf);          bos.write(buf, 0, count);        }        catch (DataFormatException e) {          // this will happen if the field is not compressed          CorruptIndexException newException = new CorruptIndexException("field data are in wrong format: " + e.toString());          newException.initCause(e);          throw newException;        }      }    } finally {        decompressor.end();    }        // Get the decompressed data    return bos.toByteArray();  }    // Instances of this class hold field properties and data  // for merge  final static class FieldForMerge extends AbstractField {    public String stringValue() {      return (String) this.fieldsData;    }    public Reader readerValue() {      // not needed for merge      return null;    }    public byte[] binaryValue() {      return (byte[]) this.fieldsData;    }    public TokenStream tokenStreamValue() {      // not needed for merge      return null;    }        public FieldForMerge(Object value, FieldInfo fi, boolean binary, boolean compressed, boolean tokenize) {      this.isStored = true;        this.fieldsData = value;      this.isCompressed = compressed;      this.isBinary = binary;      this.isTokenized = tokenize;      this.name = fi.name.intern();      this.isIndexed = fi.isIndexed;      this.omitNorms = fi.omitNorms;                this.storeOffsetWithTermVector = fi.storeOffsetWithTermVector;      this.storePositionWithTermVector = fi.storePositionWithTermVector;      this.storeTermVector = fi.storeTermVector;                }       }}

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
久久午夜羞羞影院免费观看| 99国产精品久| 日韩精品一区二区三区在线观看| 五月天久久比比资源色| 欧美日韩一区二区三区在线| 三级在线观看一区二区| 欧美一级二级在线观看| 久久电影网电视剧免费观看| 中文字幕一区二区在线播放| 91麻豆免费观看| 五月天欧美精品| 精品国产乱码久久久久久1区2区| 国产精品自拍一区| 亚洲精品中文在线观看| 欧美日韩国产首页| 精品伊人久久久久7777人| 久久久噜噜噜久久中文字幕色伊伊 | 亚洲精品一区二区三区精华液| 韩国成人在线视频| 亚洲欧洲另类国产综合| 欧美三级一区二区| 狠狠色丁香婷综合久久| 成人欧美一区二区三区视频网页| 欧美三级午夜理伦三级中视频| 精品一区二区免费| 亚洲视频1区2区| 在线电影院国产精品| 国产成人免费在线观看不卡| 一区二区欧美精品| 久久久久久日产精品| 91欧美一区二区| 久久99热这里只有精品| 亚洲素人一区二区| 欧美二区乱c少妇| 高清在线成人网| 亚洲www啪成人一区二区麻豆| 国产午夜精品福利| 欧美精选一区二区| 成人av网在线| 国产91精品久久久久久久网曝门| 亚洲精品久久久蜜桃| 精品动漫一区二区三区在线观看| 色视频成人在线观看免| 国产一区二区0| 香蕉久久一区二区不卡无毒影院 | 国产亚洲精品aa| 欧美日韩亚洲综合在线 欧美亚洲特黄一级| 偷窥国产亚洲免费视频| 亚洲欧洲精品一区二区精品久久久| 日韩一区二区电影在线| 99国产欧美另类久久久精品| 国产乱对白刺激视频不卡| 日日摸夜夜添夜夜添精品视频| 国产精品少妇自拍| xvideos.蜜桃一区二区| 欧美理论电影在线| 日本乱码高清不卡字幕| 成人福利电影精品一区二区在线观看| 久久精品国产一区二区三| 天天操天天综合网| 亚洲综合成人网| 伊人色综合久久天天人手人婷| 国产午夜精品美女毛片视频| 精品国偷自产国产一区| 欧美一级在线免费| 欧美日韩成人综合| 欧美日韩免费观看一区二区三区| 色婷婷精品大在线视频| av亚洲产国偷v产偷v自拍| 高清在线成人网| 丁香六月综合激情| 成人永久aaa| 成人毛片老司机大片| 成人午夜精品在线| 成人精品国产一区二区4080| 国产成人av网站| 成人永久免费视频| 北条麻妃一区二区三区| 99精品欧美一区| 91蜜桃在线观看| 欧美在线观看一区| 欧美亚日韩国产aⅴ精品中极品| 91色porny| 欧美在线高清视频| 欧美精品黑人性xxxx| 日韩一区二区免费视频| 精品精品国产高清一毛片一天堂| 久久久久久影视| 欧美激情一二三区| 中文字幕亚洲一区二区va在线| 免费观看日韩av| 韩国欧美国产1区| 成人v精品蜜桃久久一区| 92精品国产成人观看免费 | 国产一区久久久| 国产成人免费在线观看不卡| 99re热视频这里只精品| 91国产福利在线| 日韩一级黄色片| 国产欧美一区二区三区在线老狼 | 久久综合色综合88| 国产精品婷婷午夜在线观看| 日韩毛片在线免费观看| 午夜精品一区二区三区电影天堂| 蜜臀av在线播放一区二区三区| 高清国产一区二区三区| 91浏览器在线视频| 欧美一二三四区在线| 国产日产欧美一区| 一区二区三区中文字幕精品精品| 日韩精品电影一区亚洲| 国产传媒日韩欧美成人| 在线观看日韩av先锋影音电影院| 日韩欧美资源站| 成人免费在线观看入口| 男女性色大片免费观看一区二区 | 视频一区二区中文字幕| 国产精品一二三四| 色八戒一区二区三区| 日韩精品自拍偷拍| 亚洲欧洲精品一区二区三区| 麻豆久久一区二区| av不卡免费在线观看| 欧美精品丝袜久久久中文字幕| 久久久国产午夜精品| 婷婷久久综合九色综合绿巨人| 国产福利一区二区| 69久久夜色精品国产69蝌蚪网| 国产精品嫩草99a| 精品一区二区免费| 欧美日韩国产精品成人| 日本一区二区高清| 蜜桃传媒麻豆第一区在线观看| 91啦中文在线观看| 国产亚洲成年网址在线观看| 日韩主播视频在线| 色哟哟一区二区| 中文字幕国产一区| 久久电影网站中文字幕| 欧美日韩成人在线一区| 亚洲精品成人精品456| 国产成人免费在线视频| 精品国产伦理网| 午夜精品久久久久久久久| 色综合久久久久久久| 国产精品不卡一区| 国产精品亚洲第一区在线暖暖韩国 | 欧美日韩高清不卡| 亚洲天堂免费看| 色88888久久久久久影院野外 | 91免费观看在线| 国产亚洲精品久| 国产一区二区三区免费播放| 制服丝袜中文字幕一区| 一区二区日韩av| 欧美性videosxxxxx| 中文字幕佐山爱一区二区免费| 波多野结衣在线aⅴ中文字幕不卡| 久久久亚洲精品石原莉奈| 久久精品72免费观看| 91精品国产黑色紧身裤美女| 亚洲成av人片一区二区| 777精品伊人久久久久大香线蕉| 亚洲制服欧美中文字幕中文字幕| 91久久精品午夜一区二区| 亚洲男人天堂av| 色婷婷激情久久| 亚洲国产aⅴ成人精品无吗| 在线观看国产一区二区| 亚洲一区二区偷拍精品| 欧美丝袜丝nylons| 天天色综合成人网| 日韩欧美国产一区在线观看| 蜜桃精品在线观看| 精品国产青草久久久久福利| 国产麻豆成人精品| 国产精品天干天干在观线| 成人国产亚洲欧美成人综合网| 中文字幕中文字幕在线一区 | 亚洲午夜三级在线| 欧美少妇一区二区| 日韩精品成人一区二区三区| 日韩精品中文字幕在线不卡尤物 | 五月天一区二区| 欧美电影免费观看高清完整版| 精品一区二区免费| 国产精品区一区二区三区| 91网站最新地址| 亚洲午夜精品网| 日韩欧美色综合网站| 国产丶欧美丶日本不卡视频| 综合久久给合久久狠狠狠97色| 欧美中文字幕一区| 毛片av一区二区| 国产精品无人区| 欧美日韩成人高清| 国产一区二区三区免费| 亚洲美女屁股眼交3| 欧美日本一道本| 国产精品1区二区.|