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


Java DataOutput.writeBoolean方法代码示例

本文整理汇总了Java中java.io.DataOutput.writeBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java DataOutput.writeBoolean方法的具体用法?Java DataOutput.writeBoolean怎么用?Java DataOutput.writeBoolean使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在java.io.DataOutput的用法示例。


在下文中一共展示了DataOutput.writeBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: writeINodeReferenceWithCount

import java.io.DataOutput; //导入方法依赖的package包/类
public void writeINodeReferenceWithCount(
    INodeReference.WithCount withCount, DataOutput out,
    boolean writeUnderConstruction) throws IOException {
  final INode referred = withCount.getReferredINode();
  final long id = withCount.getId();
  final boolean firstReferred = !referenceMap.containsKey(id);
  out.writeBoolean(firstReferred);

  if (firstReferred) {
    FSImageSerialization.saveINode2Image(referred, out,
        writeUnderConstruction, this);
    referenceMap.put(id, withCount);
  } else {
    out.writeLong(id);
  }
}
 
开发者ID:naver,项目名称:hadoop,代码行数:17,代码来源:SnapshotFSImageFormat.java

示例2: write

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void write(DataOutput out) throws IOException {
  Text.writeString(out, getPath().toString(), Text.DEFAULT_MAX_LEN);
  out.writeLong(getLen());
  out.writeBoolean(isDirectory());
  out.writeShort(getReplication());
  out.writeLong(getBlockSize());
  out.writeLong(getModificationTime());
  out.writeLong(getAccessTime());
  getPermission().write(out);
  Text.writeString(out, getOwner(), Text.DEFAULT_MAX_LEN);
  Text.writeString(out, getGroup(), Text.DEFAULT_MAX_LEN);
  out.writeBoolean(isSymlink());
  if (isSymlink()) {
    Text.writeString(out, getSymlink().toString(), Text.DEFAULT_MAX_LEN);
  }
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:18,代码来源:FileStatus.java

示例3: write

import java.io.DataOutput; //导入方法依赖的package包/类
public static void write(BigDecimal d, DataOutput out) throws IOException {
  int scale = d.scale();
  BigInteger bigIntPart = d.unscaledValue();
  boolean fastpath = bigIntPart.compareTo(LONG_MAX_AS_BIGINT) < 0
      && bigIntPart .compareTo(LONG_MIN_AS_BIGINT) > 0;

  out.writeInt(scale);
  out.writeBoolean(fastpath);
  if (fastpath) {
    out.writeLong(bigIntPart.longValue());
  } else {
    Text.writeString(out, bigIntPart.toString());
  }
}
 
开发者ID:aliyun,项目名称:aliyun-maxcompute-data-collectors,代码行数:15,代码来源:BigDecimalSerializer.java

示例4: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  out.writeUTF(this.serviceName);
  DataSerializer.writeObject(this.objectName, out);
  out.writeLong(this.startTime);
  out.writeLong(this.leaseMillis);
  out.writeLong(this.waitMillis);
  out.writeBoolean(this.reentrant);
  out.writeBoolean(this.tryLock);
  out.writeInt(this.processorId);
  out.writeInt(this.lockId);
  out.writeInt(this.threadId);
  out.writeLong(this.grantorVersion);
  out.writeInt(this.grantorSerialNumber);
  out.writeInt(this.dlsSerialNumber);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:18,代码来源:DLockRequestProcessor.java

示例5: write

import java.io.DataOutput; //导入方法依赖的package包/类
public void write(DataOutput out) throws IOException {
  taskId.write(out); 
  WritableUtils.writeVInt(out, idWithinJob);
  out.writeBoolean(isMap);
  WritableUtils.writeEnum(out, status); 
  WritableUtils.writeString(out, taskTrackerHttp);
  WritableUtils.writeVInt(out, taskRunTime);
  WritableUtils.writeVInt(out, eventId);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:10,代码来源:TaskCompletionEvent.java

示例6: write

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void write(DataOutput out) throws IOException {
  out.writeLong(version);
  if (methods == null) {
    out.writeBoolean(false);
  } else {
    out.writeBoolean(true);
    out.writeInt(methods.length);
    for (int method : methods) {
      out.writeInt(method);
    }
  }
}
 
开发者ID:nucypher,项目名称:hadoop-oss,代码行数:14,代码来源:ProtocolSignature.java

示例7: write

import java.io.DataOutput; //导入方法依赖的package包/类
/**
 * GenericCounter ::= keyName isDistinctDisplayName [displayName] value
 */
@Override
public synchronized void write(DataOutput out) throws IOException {
  Text.writeString(out, name);
  boolean distinctDisplayName = ! name.equals(displayName);
  out.writeBoolean(distinctDisplayName);
  if (distinctDisplayName) {
    Text.writeString(out, displayName);
  }
  WritableUtils.writeVLong(out, value);
}
 
开发者ID:naver,项目名称:hadoop,代码行数:14,代码来源:GenericCounter.java

示例8: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  if (this.value == null) {
    out.writeBoolean(true); // null entry
  } else {
    out.writeBoolean(false); // null entry
    InternalDataSerializer.invokeToData((DataSerializable) this.value, out);
  }
}
 
开发者ID:ampool,项目名称:monarch,代码行数:11,代码来源:RemoteFetchEntryMessage.java

示例9: toData

import java.io.DataOutput; //导入方法依赖的package包/类
public void toData(DataOutput out) throws IOException {
  out.writeBoolean(host != null);
  if (host != null) {
    DataSerializer.writeInetAddress(host, out);
  }
  out.writeBoolean(directory != null);
  if (directory != null) {
    DataSerializer.writeString(directory, out);
  }

  DataSerializer.writeObject(diskStoreID, out);
  out.writeLong(revokedTime);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:14,代码来源:PersistentMemberPattern.java

示例10: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  out.writeInt(this.processorId);
  out.writeBoolean(this.netWriteSucceeded);
  DataSerializer.writeObject(this.e, out);
  out.writeBoolean(this.cacheWriterException);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:SearchLoadAndWriteProcessor.java

示例11: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  DataSerializer.writeString(this.regionPath, out);
  out.writeInt(this.processorId);
  out.writeBoolean(this.keysOnly);
  out.writeBoolean(this.targetReinitialized);
  out.writeBoolean(this.checkTombstoneVersions);
  DataSerializer.writeObject(this.lostMemberVersionID, out);
  DataSerializer.writeObject(this.versionVector, out);
  DataSerializer.writeObject(this.lostMemberID, out);
  DataSerializer.writeObject(this.unfinishedKeys, out);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:14,代码来源:InitialImageOperation.java

示例12: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  DataSerializer.writeString(this.name, out);
  DataSerializer.writeObject(this.host, out);
  DataSerializer.writeObject(this.geodeHomeDir, out);
  DataSerializer.writeObject(this.workingDir, out);
  out.writeLong(this.birthDate);
  out.writeBoolean(this.isDedicatedCacheServer);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:11,代码来源:FetchHostResponse.java

示例13: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  out.writeBoolean(this.internal);
  out.writeBoolean(this.fetchOfflineMembers);
  DataSerializer.writeObject(loadProbe, out);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:8,代码来源:FetchPartitionDetailsMessage.java

示例14: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput dout) throws IOException {
  super.toData(dout);
  dout.writeInt(processorId);
  DataSerializer.writeHashMap(channelState, dout);
  DataSerializer.writeObject(requestingMember, dout);
  dout.writeBoolean(this.isSingleFlushTo);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:9,代码来源:StateFlushOperation.java

示例15: toData

import java.io.DataOutput; //导入方法依赖的package包/类
@Override
public void toData(DataOutput out) throws IOException {
  super.toData(out);
  out.writeBoolean(alertListenerExpected);
  out.writeBoolean(crashed);
  DataSerializer.writeString(reason, out);
}
 
开发者ID:ampool,项目名称:monarch,代码行数:8,代码来源:AdminConsoleDisconnectMessage.java


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