本文整理汇总了Java中io.github.htools.io.buffer.BufferReaderWriter.readString方法的典型用法代码示例。如果您正苦于以下问题:Java BufferReaderWriter.readString方法的具体用法?Java BufferReaderWriter.readString怎么用?Java BufferReaderWriter.readString使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类io.github.htools.io.buffer.BufferReaderWriter
的用法示例。
在下文中一共展示了BufferReaderWriter.readString方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: decode
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void decode(Document d, int reportid) {
try {
ArrayList<Occurrence> list = new ArrayList<Occurrence>();
BufferReaderWriter reader = new BufferReaderWriter((byte[]) d.reportdata[reportid]);
int size = reader.readCInt();
for (int i = 0; i < size; i++) {
Occurrence o = new Occurrence();
o.phrase = reader.readString();
o.span = reader.readCInt();
o.pos = reader.readCInt();
list.add(o);
}
d.reportdata[reportid] = list;
//log.info("decode doc %d reportid %d occ %d ist %d", d.docid, reportid, size, ((ArrayList<Occurrence>)d.reportdata[reportid]).size());
} catch (EOCException ex) {
log.fatalexception(ex, "valueReported(%s)", d);
}
}
示例2: readFields
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
reader = new BufferReaderWriter(in);
collectorid = reader.readCInt();
String collectorclass = reader.readString();
collector = Collector.create(collectorclass);
partition = reader.readCInt();
//log.info("readFields class=%s", collectorclass);
collector.readKey(reader);
collector.readValue(reader);
reader = null;
}
示例3: readFields
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
BufferReaderWriter reader = new BufferReaderWriter(in);
reducer = reader.readCInt();
isQuery = reader.readBoolean();
if (isQuery) {
query = new Query();
query.read(reader);
} else {
String classname = reader.readString();
collector = Collector.create(classname);
collector.readKey(reader);
}
}
示例4: readKey
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public String readKey(BufferReaderWriter reader) {
return reader.readString();
}
示例5: readValue
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public String readValue(BufferReaderWriter reader) {
return reader.readString();
}
示例6: readFields
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
public void readFields(DataInput in) throws IOException {
BufferReaderWriter reader = new BufferReaderWriter(in);
strategy = reader.readString();
query = reader.readInt();
time = reader.readDouble();
}
示例7: readKey
import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public String readKey(BufferReaderWriter reader) {
return reader.readString();
}