本文整理汇总了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);
}
}
示例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();
}
示例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();
}
示例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();
}
示例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();
}
示例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;
}
示例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();
}
示例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();
}