當前位置: 首頁>>代碼示例>>Java>>正文


Java DataInput.readBoolean方法代碼示例

本文整理匯總了Java中java.io.DataInput.readBoolean方法的典型用法代碼示例。如果您正苦於以下問題:Java DataInput.readBoolean方法的具體用法?Java DataInput.readBoolean怎麽用?Java DataInput.readBoolean使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.io.DataInput的用法示例。


在下文中一共展示了DataInput.readBoolean方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: fromData

import java.io.DataInput; //導入方法依賴的package包/類
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  this.hasKeys = in.readBoolean();
  if (this.hasKeys) {
    this.keys = new ArrayList();
  }
  int numObjects = in.readInt();
  if (numObjects > 0) {
    for (int index = 0; index < numObjects; ++index) {
      if (this.hasKeys) {
        Object key = DataSerializer.readObject(in);
        this.keys.add(key);
      }
      boolean isException = in.readBoolean();
      Object value;
      if (isException) {
        byte[] exBytes = DataSerializer.readByteArray(in);
        value = CacheServerHelper.deserialize(exBytes);
        // ignore the exception string meant for native clients
        DataSerializer.readString(in);
      } else {
        value = DataSerializer.readObject(in);
      }
      this.objects.add(value);
    }
  }
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:27,代碼來源:ObjectPartList.java

示例2: removeAllFromData

import java.io.DataInput; //導入方法依賴的package包/類
/**
 * @param in
 * @throws IOException
 * @throws ClassNotFoundException
 */
private void removeAllFromData(DataInput in) throws IOException, ClassNotFoundException {
  int removeAllSize = DataSerializer.readInteger(in);
  final RemoveAllEntryData[] removeAllData = new RemoveAllEntryData[removeAllSize];
  final Version version = InternalDataSerializer.getVersionForDataStreamOrNull(in);
  final ByteArrayDataInput bytesIn = new ByteArrayDataInput();
  for (int i = 0; i < removeAllSize; i++) {
    removeAllData[i] = new RemoveAllEntryData(in, this.eventID, i, version, bytesIn);
  }

  boolean hasTags = in.readBoolean();
  if (hasTags) {
    EntryVersionsList versionTags = EntryVersionsList.create(in);
    for (int i = 0; i < removeAllSize; i++) {
      removeAllData[i].versionTag = versionTags.get(i);
    }
  }
  // TODO DISTTX: release this event
  EntryEventImpl e = EntryEventImpl.create(this.region, Operation.REMOVEALL_DESTROY, null, null,
      null, true, this.getDistributedMember(), true, true);
  this.removeAllOp =
      new DistributedRemoveAllOperation(e, removeAllSize, false /* [DISTTX] TODO */);
  this.removeAllOp.setRemoveAllEntryData(removeAllData);
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:29,代碼來源:DistTxEntryEvent.java

示例3: fromDataPre_GFE_8_0_0_0

import java.io.DataInput; //導入方法依賴的package包/類
public void fromDataPre_GFE_8_0_0_0(DataInput in) throws IOException, ClassNotFoundException {
  super.fromData(in);
  this.Id = DataSerializer.readString(in);
  this.startTime = in.readLong();
  this.remoteDSId = in.readInt();
  this.isRunning = in.readBoolean();
  this.isPrimary = in.readBoolean();
  this.isParallel = in.readBoolean();
  this.isBatchConflationEnabled = in.readBoolean();
  this.isPersistenceEnabled = in.readBoolean();
  this.alertThreshold = in.readInt();
  this.manualStart = in.readBoolean();
  this.eventFiltersClassNames = DataSerializer.readArrayList(in);
  this.transFiltersClassNames = DataSerializer.readArrayList(in);
  this.senderEventListenerClassNames = DataSerializer.readArrayList(in);
  this.isDiskSynchronous = in.readBoolean();
  this.dispatcherThreads = in.readInt();
  this.orderPolicy = DataSerializer.readObject(in);
  boolean serverLocationFound = DataSerializer.readPrimitiveBoolean(in);
  if (serverLocationFound) {
    this.serverLocation = new ServerLocation();
    InternalDataSerializer.invokeFromData(this.serverLocation, in);
  }
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:25,代碼來源:GatewaySenderAdvisor.java

示例4: readFields

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void readFields(DataInput in) throws IOException {
  String strPath = Text.readString(in, Text.DEFAULT_MAX_LEN);
  this.path = new Path(strPath);
  this.length = in.readLong();
  this.isdir = in.readBoolean();
  this.block_replication = in.readShort();
  blocksize = in.readLong();
  modification_time = in.readLong();
  access_time = in.readLong();
  permission.readFields(in);
  owner = Text.readString(in, Text.DEFAULT_MAX_LEN);
  group = Text.readString(in, Text.DEFAULT_MAX_LEN);
  if (in.readBoolean()) {
    this.symlink = new Path(Text.readString(in, Text.DEFAULT_MAX_LEN));
  } else {
    this.symlink = null;
  }
}
 
開發者ID:naver,項目名稱:hadoop,代碼行數:20,代碼來源:FileStatus.java

示例5: fromData

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  super.fromData(in);
  this.internal = in.readBoolean();
  this.fetchOfflineMembers = in.readBoolean();
  this.loadProbe = (LoadProbe) DataSerializer.readObject(in);
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:8,代碼來源:FetchPartitionDetailsMessage.java

示例6: fromDelta

import java.io.DataInput; //導入方法依賴的package包/類
public void fromDelta(DataInput in) throws IOException, InvalidDeltaException {
  if (in.readBoolean()) {
    id = in.readInt();
  }
  if (in.readBoolean()) {
    name = in.readUTF();
  }
  fromDeltaCalled = true;
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:10,代碼來源:TransactionsWithDeltaDUnitTest.java

示例7: readFields

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void readFields(DataInput in) throws IOException {
  version = in.readLong();
  boolean hasMethods = in.readBoolean();
  if (hasMethods) {
    int numMethods = in.readInt();
    methods = new int[numMethods];
    for (int i=0; i<numMethods; i++) {
      methods[i] = in.readInt();
    }
  }
}
 
開發者ID:nucypher,項目名稱:hadoop-oss,代碼行數:13,代碼來源:ProtocolSignature.java

示例8: fromData

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  super.fromData(in);
  this.isHostingTx = in.readBoolean();
  if (in.readBoolean()) {
    this.isPartialCommitMessage = in.readBoolean();
    txCommitMessage = (TXCommitMessage) InternalDataSerializer.readDSFID(in);
  }
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:10,代碼來源:FindRemoteTXMessage.java

示例9: fromData

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  super.fromData(in);
  this.processorId = in.readInt();
  this.netWriteSucceeded = in.readBoolean();
  this.e = (Exception) DataSerializer.readObject(in);
  this.cacheWriterException = in.readBoolean();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:9,代碼來源:SearchLoadAndWriteProcessor.java

示例10: 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

示例11: readFields

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void readFields(DataInput in) throws IOException {
  // The serialization format for this object is:
  // boolean isExternal
  // if true, then:
  //   a string identifying the external storage type
  //   and external-storage-specific data.
  // if false, then we use readFieldsInternal() to allow BlobRef/ClobRef
  // to serialize as it sees fit.
  //
  // Currently the only external storage supported is LobFile, identified
  // by the string "lf". This serializes with the filename (as a string),
  // followed by a long-valued offset and a long-valued length.

  boolean isExternal = in.readBoolean();
  if (isExternal) {
    this.realData = null;

    String storageType = Text.readString(in);
    if (!storageType.equals("lf")) {
      throw new IOException("Unsupported external LOB storage code: "
          + storageType);
    }

    // Storage type "lf" is LobFile: filename, offset, length.
    this.fileName = Text.readString(in);
    this.offset = in.readLong();
    this.length = in.readLong();
  } else {
    readFieldsInternal(in);

    this.fileName = null;
    this.offset = 0;
    this.length = 0;
  }
}
 
開發者ID:aliyun,項目名稱:aliyun-maxcompute-data-collectors,代碼行數:37,代碼來源:LobRef.java

示例12: fromData

import java.io.DataInput; //導入方法依賴的package包/類
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  this.partitionName = DataSerializer.readString(in);
  this.isPrimary = in.readBoolean();
  this.numBuckets = in.readInt();
  this.startingBucketID = in.readInt();

}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:8,代碼來源:FixedPartitionAttributesImpl.java

示例13: fromData

import java.io.DataInput; //導入方法依賴的package包/類
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  this.id = in.readInt();
  this.isServerBucketProfile = in.readBoolean();
  if (this.isServerBucketProfile)
    this.bp = new ServerBucketProfile();
  else
    this.bp = new BucketProfile();

  InternalDataSerializer.invokeFromData(this.bp, in);
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:11,代碼來源:RegionAdvisor.java

示例14: fromData

import java.io.DataInput; //導入方法依賴的package包/類
@Override
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  super.fromData(in);
  processorId = in.readInt();
  regionPath = DataSerializer.readString(in);
  targetReinitializing = in.readBoolean();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:8,代碼來源:MembershipViewRequest.java

示例15: fromData

import java.io.DataInput; //導入方法依賴的package包/類
public void fromData(DataInput in) throws IOException, ClassNotFoundException {
  this.name = DataSerializer.readString(in);
  this.id = in.readInt();
  this.closed = in.readBoolean();
  this.lockTimeout = in.readInt();
  this.lockLease = in.readInt();
  this.searchTimeout = in.readInt();
  this.upTime = in.readInt();
  this.rootRegionNames = DataSerializer.readStringArray(in);
  this.perfStats = (RemoteStatResource) DataSerializer.readObject(in);
  this.bridgeServerIds = DataSerializer.readIntArray(in);
  this.isServer = in.readBoolean();
}
 
開發者ID:ampool,項目名稱:monarch,代碼行數:14,代碼來源:RemoteCacheInfo.java


注:本文中的java.io.DataInput.readBoolean方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。