本文整理汇总了Java中com.hazelcast.nio.ObjectDataInput.readByte方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectDataInput.readByte方法的具体用法?Java ObjectDataInput.readByte怎么用?Java ObjectDataInput.readByte使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.hazelcast.nio.ObjectDataInput
的用法示例。
在下文中一共展示了ObjectDataInput.readByte方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public Expression read(ObjectDataInput in) throws IOException {
int clnId = in.readInt();
Comparison compType = Comparison.values()[in.readInt()];
byte type = in.readByte();
if (type == 0) {
return new AlwaysExpression(clnId);
}
PathBuilder path = in.readObject();
if (type == 1) {
return new BinaryExpression(clnId, compType, path);
} else {
return new PathExpression(clnId, compType, path, in.readUTF(),
(QueriedPath) in.readObject());
}
}
示例2: read
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public LogValue read(ObjectDataInput in) throws IOException {
final int typeId = in.readByte();
switch(typeId) {
case BYTE_VALUE:
return new ByteValue(in.<byte[]>readObject());
case NO_OP:
return NoOp.VALUE;
default:
}
log.error("Unexpected type encountered: {}", typeId);
return null;
}
示例3: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
super.readData(in);
byte rawByte = in.readByte();
status = rawByte != Byte.MIN_VALUE ? Status.valueOf(rawByte) : null;
}
示例4: readData
import com.hazelcast.nio.ObjectDataInput; //导入方法依赖的package包/类
@Override
public void readData(ObjectDataInput in) throws IOException {
super.readData(in);
Byte rawByte = in.readByte();
status = rawByte != Byte.MIN_VALUE ? Status.valueOf(rawByte) : null;
int rawInt = in.readInt();
qos = rawInt != Byte.MIN_VALUE ? MqttQoS.valueOf(rawInt) : null;
}