本文整理汇总了Java中org.galagosearch.tupleflow.VByteInput类的典型用法代码示例。如果您正苦于以下问题:Java VByteInput类的具体用法?Java VByteInput怎么用?Java VByteInput使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
VByteInput类属于org.galagosearch.tupleflow包,在下文中一共展示了VByteInput类的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decodeDocument
import org.galagosearch.tupleflow.VByteInput; //导入依赖的package包/类
Document decodeDocument(String key, DataStream stream) throws IOException {
VByteInput input = new VByteInput(stream);
Document document = new Document();
// The first string is the document text, followed by
// key/value metadata pairs.
document.identifier = key;
document.text = input.readString();
document.metadata = new HashMap<String, String>();
while (!stream.isDone()) {
String mapKey = input.readString();
String mapValue = input.readString();
document.metadata.put(mapKey, mapValue);
}
return document;
}
示例2: load
import org.galagosearch.tupleflow.VByteInput; //导入依赖的package包/类
void load() throws IOException {
if (iterator != null) {
DataStream buffered = iterator.getValueStream();
stream = new VByteInput(buffered);
documentCount = stream.readInt();
index = -1;
currentDocument = 0;
if (documentCount > 0) {
read();
}
}
}
示例3: readHeader
import org.galagosearch.tupleflow.VByteInput; //导入依赖的package包/类
private void readHeader(DataStream compressedStream) throws IOException {
stream = new VByteInput(compressedStream);
options = stream.readInt();
documentCount = stream.readInt();
termDocs = 0;
done = false;
nextDocument();
}
示例4: readHeader
import org.galagosearch.tupleflow.VByteInput; //导入依赖的package包/类
private void readHeader(DataStream compressedStream) throws IOException {
stream = new VByteInput(compressedStream);
options = stream.readInt();
documentCount = stream.readInt();
document = 0;
termDocs = 0;
done = false;
nextDocument();
}