当前位置: 首页>>代码示例>>Java>>正文


Java BufferReaderWriter.readString方法代码示例

本文整理汇总了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);
   }
}
 
开发者ID:repir,项目名称:repirproximity,代码行数:20,代码来源:AnalyzeDistanceFeature.java

示例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;
}
 
开发者ID:repir,项目名称:repir,代码行数:13,代码来源:CollectorValue.java

示例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);
   }
}
 
开发者ID:repir,项目名称:repir,代码行数:15,代码来源:CollectorKey.java

示例4: readKey

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public String readKey(BufferReaderWriter reader) {
    return reader.readString();
}
 
开发者ID:htools,项目名称:htools,代码行数:5,代码来源:StringFileInputSplit.java

示例5: readValue

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public String readValue(BufferReaderWriter reader) {
   return reader.readString();
}
 
开发者ID:htools,项目名称:htools,代码行数:5,代码来源:StringPairInputSplit.java

示例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();
}
 
开发者ID:repir,项目名称:repirproximity,代码行数:7,代码来源:RecordedTime.java

示例7: readKey

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public String readKey(BufferReaderWriter reader) {
   return reader.readString();
}
 
开发者ID:repir,项目名称:repir,代码行数:5,代码来源:StringInputSplit.java


注:本文中的io.github.htools.io.buffer.BufferReaderWriter.readString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。