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