當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。