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


Java BufferReaderWriter.readString0方法代码示例

本文整理汇总了Java中io.github.htools.io.buffer.BufferReaderWriter.readString0方法的典型用法代码示例。如果您正苦于以下问题:Java BufferReaderWriter.readString0方法的具体用法?Java BufferReaderWriter.readString0怎么用?Java BufferReaderWriter.readString0使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在io.github.htools.io.buffer.BufferReaderWriter的用法示例。


在下文中一共展示了BufferReaderWriter.readString0方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
   try {
      int length = in.readInt();
      byte b[] = new byte[length];
      in.readFully(b);
      BufferReaderWriter reader = new BufferReaderWriter(b);
      type = Type.values()[ reader.readByte()];
      partition = reader.readShort();
      feature = reader.readByte();
      termid = reader.readInt();
      collectionid = reader.readString0();
   } catch (EOCException ex) {
      throw new IOException(ex);
   }
}
 
开发者ID:htools,项目名称:htools,代码行数:17,代码来源:RecordKey.java

示例2: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
    BufferReaderWriter reader = new BufferReaderWriter(in);
    set(reader.readString0());
    value2 = reader.readString0();
    value3 = reader.readInt();
}
 
开发者ID:htools,项目名称:htools,代码行数:8,代码来源:TextTextInt.java

示例3: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
    BufferReaderWriter reader = new BufferReaderWriter(in);
    set(reader.readLong());
    value2 = reader.readString0();
    value3 = reader.readString0();
}
 
开发者ID:htools,项目名称:htools,代码行数:8,代码来源:LongTextText.java

示例4: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
    BufferReaderWriter reader = new BufferReaderWriter(in);
    set(reader.readString0());
    value1 = reader.readString0();
    value2 = reader.readInt();
    value3 = reader.readInt();
    isCandidate = reader.readBoolean();
}
 
开发者ID:htools,项目名称:htools,代码行数:10,代码来源:TextTextIntIntBool.java

示例5: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(BufferReaderWriter reader) {
    value = reader.readString0();
    value1 = reader.readLong();
    value2 = reader.readInt();
    value3 = reader.readInt();
    isCandidate = reader.readBoolean();
}
 
开发者ID:htools,项目名称:htools,代码行数:9,代码来源:TextLongIntIntBool.java

示例6: find

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public StructuredFileCollisionRecord find(BufferReaderWriter table, StructuredFileCollisionRecord r) {
    Record rr = (Record) r;
    byte needle[] = rr.name.getBytes();
    int match;
    int offset = table.bufferpos;
    //log.info("find() %s offset %d end %d", rr.name, offset, table.end);
    while (table.bufferpos < table.end) {
        try {
            for (match = 0; match < needle.length && table.buffer[table.bufferpos + match] == needle[match]; match++);
            //log.info("match %d", match);
            if (match == needle.length && table.buffer[table.bufferpos + match] == 0) {
                table.skipString0();
                rr.count = table.readInt();
                return rr;
            }
            int bucketindex = ByteTools.string0HashCode(table.buffer, table.bufferpos, table.end) & (this.getBucketCapacity() - 1);
            if (bucketindex > rr.getBucketIndex()) {
                break;
            }
            String s = table.readString0();
            //log.info("%s %s", rr.name, s);
            table.skip(4);
        } catch (EOCException ex) {
            log.exception(ex, "find( %s, %s )", table, r);
        }
    }
    return null;
}
 
开发者ID:htools,项目名称:htools,代码行数:30,代码来源:StructuredFileCollisionTest.java

示例7: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
    BufferReaderWriter reader = new BufferReaderWriter(in);
    set(reader.readString0());
    value2 = reader.readString0();
}
 
开发者ID:htools,项目名称:htools,代码行数:7,代码来源:TextText.java

示例8: readFields

import io.github.htools.io.buffer.BufferReaderWriter; //导入方法依赖的package包/类
@Override
public void readFields(DataInput in) throws IOException {
    BufferReaderWriter reader = new BufferReaderWriter(in);
    set(reader.readLong());
    value2 = reader.readString0();
}
 
开发者ID:htools,项目名称:htools,代码行数:7,代码来源:LongText.java


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