本文整理汇总了Java中java.io.DataInput.readInt方法的典型用法代码示例。如果您正苦于以下问题:Java DataInput.readInt方法的具体用法?Java DataInput.readInt怎么用?Java DataInput.readInt使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.io.DataInput
的用法示例。
在下文中一共展示了DataInput.readInt方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
regionPath = DataSerializer.readString(in);
processorId = in.readInt();
boolean hasId = in.readBoolean();
if (hasId) {
id = new PersistentMemberID();
id.fromData(in);
}
boolean hasInitializingId = in.readBoolean();
if (hasInitializingId) {
initializingId = new PersistentMemberID();
initializingId.fromData(in);
}
}
示例2: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
short flags = in.readShort();
if ((flags & HAS_PROCESSOR_ID) != 0) {
this.processorId = in.readInt();
ReplyProcessor21.setMessageRPId(this.processorId);
}
this.regionName = in.readUTF();
this.key = DataSerializer.readObject(in);
this.timeoutMs = in.readInt();
if ((flags & HAS_TTL) != 0) {
this.ttl = (int) InternalDataSerializer.readSignedVL(in);
}
if ((flags & HAS_IDLE_TIME) != 0) {
this.idleTime = (int) InternalDataSerializer.readSignedVL(in);
}
}
示例3: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.prId = in.readInt();
this.processorId = in.readInt();
this.profiles = DataSerializer.readObject(in);
}
示例4: read
import java.io.DataInput; //导入方法依赖的package包/类
void read(DataInput input, int depth, NBTSizeTracker sizeTracker) throws IOException
{
sizeTracker.read(296L);
if (depth > 512)
{
throw new RuntimeException("Tried to read NBT tag with too high complexity, depth > 512");
}
else
{
this.tagType = input.readByte();
int i = input.readInt();
if (this.tagType == 0 && i > 0)
{
throw new RuntimeException("Missing type on ListTag");
}
else
{
sizeTracker.read(32L * (long)i);
this.tagList = Lists.<NBTBase>newArrayListWithCapacity(i);
for (int j = 0; j < i; ++j)
{
NBTBase nbtbase = NBTBase.createNewByType(this.tagType);
nbtbase.read(input, depth + 1, sizeTracker);
this.tagList.add(nbtbase);
}
}
}
}
示例5: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.grantor = (InternalDistributedMember) DataSerializer.readObject(in);
this.elderVersionId = in.readLong();
this.grantorSerialNumber = in.readInt();
this.needsRecovery = in.readBoolean();
}
示例6: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.prId = in.readInt();
this.bucketId = in.readInt();
this.processorId = in.readInt();
this.profile = (BucketAdvisor.BucketProfile) DataSerializer.readObject(in);
}
示例7: read
import java.io.DataInput; //导入方法依赖的package包/类
static PackageExport[] read(DataInput is) throws IOException {
int cnt = is.readInt();
if (cnt == 0) {
return null;
}
PackageExport[] arr = new PackageExport[cnt];
for (int i = 0; i < cnt; i++) {
String pkg = is.readUTF();
boolean recursive = is.readBoolean();
arr[i] = new PackageExport(pkg, recursive);
}
return arr;
}
示例8: readFields
import java.io.DataInput; //导入方法依赖的package包/类
@Override
@InterfaceAudience.Private
public void readFields(DataInput in) throws IOException {
blockSize = in.readLong();
bytesPerChecksum = in.readInt();
writePacketSize = in.readInt();
replication = in.readShort();
fileBufferSize = in.readInt();
checksumType = WritableUtils.readEnum(in, DataChecksum.Type.class);
}
示例9: readArrayList
import java.io.DataInput; //导入方法依赖的package包/类
static <T> ArrayList<T> readArrayList(DataInput input, Function<DataInput, T> reader) throws IOException {
int size = input.readInt();
ArrayList<T> result = new ArrayList<>(size);
for (int i = 0; i < size; i++) {
result.add(reader.apply(input));
}
return result;
}
示例10: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
readEssentialData(in);
this.directPort = in.readInt();
this.memberWeight = in.readByte();
this.vmKind = in.readByte();
this.processId = in.readInt();
this.name = DataSerializer.readString(in);
this.groups = DataSerializer.readStringArray(in);
}
示例11: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.bucketId = in.readInt();
this.seriesNum = in.readInt();
this.msgNum = in.readInt();
this.numSeries = in.readInt();
this.lastInSeries = in.readBoolean();
this.chunk = DataSerializer.readByteArray(in);
hasRVV = in.readBoolean();
}
示例12: readFields
import java.io.DataInput; //导入方法依赖的package包/类
@Override public void readFields(DataInput in) throws IOException {
int size = in.readInt();
ranges = new MDRange[size];
for (int i = 0; i < size; i++) {
int min = in.readInt();
int max = in.readInt();
ranges[i] = new MDRange(min, max);
}
}
示例13: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
this.processorId = in.readInt();
}
示例14: fromData
import java.io.DataInput; //导入方法依赖的package包/类
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
this.field1 = in.readInt();
}
示例15: fromData
import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
super.fromData(in);
regionPath = DataSerializer.readString(in);
processorId = in.readInt();
}