本文整理汇总了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);
}
}
示例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);
}
}
示例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());
}
}
示例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);
}
示例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);
}
示例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);
}
}
}
示例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);
}
示例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);
}
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}
示例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);
}