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


Java DataInput.readInt方法代码示例

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

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

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

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

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

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

示例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;
}
 
开发者ID:apache,项目名称:incubator-netbeans,代码行数:14,代码来源:Module.java

示例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);
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:11,代码来源:FsServerDefaults.java

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

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

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

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

示例13: fromData

import java.io.DataInput; //导入方法依赖的package包/类
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  super.fromData(in);
  this.processorId = in.readInt();
}
 
开发者ID:ampool,项目名称:monarch,代码行数:6,代码来源:ElderInitProcessor.java

示例14: fromData

import java.io.DataInput; //导入方法依赖的package包/类
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  this.field1 = in.readInt();
}
 
开发者ID:ampool,项目名称:monarch,代码行数:4,代码来源:InstantiatorPropagationDUnitTest.java

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


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