当前位置: 首页>>代码示例>>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;未经允许,请勿转载。