本文整理汇总了Java中org.apache.lucene.store.RandomAccessInput类的典型用法代码示例。如果您正苦于以下问题:Java RandomAccessInput类的具体用法?Java RandomAccessInput怎么用?Java RandomAccessInput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
RandomAccessInput类属于org.apache.lucene.store包,在下文中一共展示了RandomAccessInput类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: getMissingBits
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
private Bits getMissingBits(final long offset) throws IOException {
if (offset == -1) {
return new Bits.MatchAllBits(maxDoc);
} else {
int length = (int) ((maxDoc + 7L) >>> 3);
final RandomAccessInput in = data.randomAccessSlice(offset, length);
return new Bits() {
@Override
public boolean get(int index) {
try {
return (in.readByte(index >> 3) & (1 << (index & 7))) != 0;
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Override
public int length() {
return maxDoc;
}
};
}
}
示例2: getInstance
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
/**
* Retrieves an instance from the specified slice written decoding
* {@code bitsPerValue} for each value
*/
public static LongValues getInstance(RandomAccessInput slice, int bitsPerValue) {
switch (bitsPerValue) {
case 1: return new DirectPackedReader1(slice);
case 2: return new DirectPackedReader2(slice);
case 4: return new DirectPackedReader4(slice);
case 8: return new DirectPackedReader8(slice);
case 12: return new DirectPackedReader12(slice);
case 16: return new DirectPackedReader16(slice);
case 20: return new DirectPackedReader20(slice);
case 24: return new DirectPackedReader24(slice);
case 28: return new DirectPackedReader28(slice);
case 32: return new DirectPackedReader32(slice);
case 40: return new DirectPackedReader40(slice);
case 48: return new DirectPackedReader48(slice);
case 56: return new DirectPackedReader56(slice);
case 64: return new DirectPackedReader64(slice);
default: throw new IllegalArgumentException("unsupported bitsPerValue: " + bitsPerValue);
}
}
示例3: DirectPackedReader1
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader1(RandomAccessInput in) {
this.in = in;
}
示例4: DirectPackedReader2
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader2(RandomAccessInput in) {
this.in = in;
}
示例5: DirectPackedReader4
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader4(RandomAccessInput in) {
this.in = in;
}
示例6: DirectPackedReader8
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader8(RandomAccessInput in) {
this.in = in;
}
示例7: DirectPackedReader12
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader12(RandomAccessInput in) {
this.in = in;
}
示例8: DirectPackedReader16
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader16(RandomAccessInput in) {
this.in = in;
}
示例9: DirectPackedReader20
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader20(RandomAccessInput in) {
this.in = in;
}
示例10: DirectPackedReader24
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader24(RandomAccessInput in) {
this.in = in;
}
示例11: DirectPackedReader28
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader28(RandomAccessInput in) {
this.in = in;
}
示例12: DirectPackedReader32
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader32(RandomAccessInput in) {
this.in = in;
}
示例13: DirectPackedReader40
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader40(RandomAccessInput in) {
this.in = in;
}
示例14: DirectPackedReader48
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader48(RandomAccessInput in) {
this.in = in;
}
示例15: DirectPackedReader56
import org.apache.lucene.store.RandomAccessInput; //导入依赖的package包/类
DirectPackedReader56(RandomAccessInput in) {
this.in = in;
}