本文整理汇总了Java中org.apache.lucene.codecs.sep.IntStreamFactory类的典型用法代码示例。如果您正苦于以下问题:Java IntStreamFactory类的具体用法?Java IntStreamFactory怎么用?Java IntStreamFactory使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
IntStreamFactory类属于org.apache.lucene.codecs.sep包,在下文中一共展示了IntStreamFactory类的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: openInput
import org.apache.lucene.codecs.sep.IntStreamFactory; //导入依赖的package包/类
@Override
public IntIndexInput openInput(Directory dir, String fileName, IOContext context) throws IOException {
// Must only use extension, because IW.addIndexes can
// rename segment!
final IntStreamFactory f = delegates.get((Math.abs(salt ^ getExtension(fileName).hashCode())) % delegates.size());
if (LuceneTestCase.VERBOSE) {
System.out.println("MockRandomCodec: read using int factory " + f + " from fileName=" + fileName);
}
return f.openInput(dir, fileName, context);
}
示例2: createOutput
import org.apache.lucene.codecs.sep.IntStreamFactory; //导入依赖的package包/类
@Override
public IntIndexOutput createOutput(Directory dir, String fileName, IOContext context) throws IOException {
final IntStreamFactory f = delegates.get((Math.abs(salt ^ getExtension(fileName).hashCode())) % delegates.size());
if (LuceneTestCase.VERBOSE) {
System.out.println("MockRandomCodec: write using int factory " + f + " to fileName=" + fileName);
}
return f.createOutput(dir, fileName, context);
}
示例3: getIntFactory
import org.apache.lucene.codecs.sep.IntStreamFactory; //导入依赖的package包/类
public IntStreamFactory getIntFactory() {
return new MockIntFactory(blockSize);
}