本文整理汇总了Java中java.io.ObjectOutput.writeLong方法的典型用法代码示例。如果您正苦于以下问题:Java ObjectOutput.writeLong方法的具体用法?Java ObjectOutput.writeLong怎么用?Java ObjectOutput.writeLong使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类java.io.ObjectOutput
的用法示例。
在下文中一共展示了ObjectOutput.writeLong方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeLong(installSnapshot.getTerm());
out.writeObject(installSnapshot.leaderId);
out.writeLong(installSnapshot.lastIncludedIndex);
out.writeLong(installSnapshot.lastIncludedTerm);
out.writeInt(installSnapshot.chunkIndex);
out.writeInt(installSnapshot.totalChunks);
out.writeByte(installSnapshot.lastChunkHashCode.isPresent() ? 1 : 0);
if (installSnapshot.lastChunkHashCode.isPresent()) {
out.writeInt(installSnapshot.lastChunkHashCode.get().intValue());
}
out.writeByte(installSnapshot.serverConfig.isPresent() ? 1 : 0);
if (installSnapshot.serverConfig.isPresent()) {
out.writeObject(installSnapshot.serverConfig.get());
}
out.writeObject(installSnapshot.data);
}
示例2: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
super.writeExternal(out);
out.writeLong(iStudentId);
out.writeLong(iConfigId);
out.writeInt(iSectionIds.size());
for (Long sectionId: iSectionIds)
out.writeLong(sectionId);
out.writeBoolean(iTimeStamp != null);
if (iTimeStamp != null)
out.writeLong(iTimeStamp.getTime());
out.writeBoolean(iApproval != null);
if (iApproval != null)
iApproval.writeExternal(out);
out.writeBoolean(iReservation != null);
if (iReservation != null)
iReservation.writeExternal(out);
}
示例3: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
out.writeLong(snapshot.lastIndex);
out.writeLong(snapshot.lastTerm);
out.writeLong(snapshot.lastAppliedIndex);
out.writeLong(snapshot.lastAppliedTerm);
out.writeLong(snapshot.electionTerm);
out.writeObject(snapshot.electionVotedFor);
out.writeObject(snapshot.serverConfig);
out.writeInt(snapshot.unAppliedEntries.size());
for (ReplicatedLogEntry e: snapshot.unAppliedEntries) {
out.writeLong(e.getIndex());
out.writeLong(e.getTerm());
out.writeObject(e.getData());
}
out.writeObject(snapshot.state);
}
示例4: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeLong(this.getId());
out.writeLong(this.getGenerationTime());
out.writeObject(this.getAlias()); // TODO (de-/encrypt for db)
out.writeObject(this.getDescription()); // TODO (de-/encrypt for db)
out.writeObject(this.getUrl()); // TODO (de-/encrypt for db)
out.writeObject(this.getImage());
out.writeBoolean(this.getFavorite());
}
示例5: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeLong( no_entry_key );
// NO_ENTRY_VALUE
out.writeDouble( no_entry_value );
}
示例6: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeLong( no_entry_key );
// NO_ENTRY_VALUE
out.writeChar( no_entry_value );
}
示例7: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeLong( no_entry_key );
// NO_ENTRY_VALUE
out.writeFloat( no_entry_value );
}
示例8: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeDouble( no_entry_key );
// NO_ENTRY_VALUE
out.writeLong( no_entry_value );
}
示例9: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeByte( no_entry_key );
// NO_ENTRY_VALUE
out.writeLong( no_entry_value );
}
示例10: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
out.writeObject(matrixUuid);
out.writeObject(affinityKey);
out.writeLong(blockIdRow);
out.writeLong(blockIdCol);
}
示例11: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeLong( no_entry_key );
// NO_ENTRY_VALUE
out.writeLong( no_entry_value );
}
示例12: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeLong(iDistributionId);
out.writeInt(iVariant);
out.writeInt(iType.ordinal());
out.writeInt(iOfferingIds.size());
for (Long offeringId: iOfferingIds)
out.writeLong(offeringId);
out.writeInt(iSectionIds.size());
for (Long sectionId: iSectionIds)
out.writeLong(sectionId);
}
示例13: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
@Override
public void writeExternal(ObjectOutput out) throws IOException {
out.writeLong(requestVote.getTerm());
out.writeObject(requestVote.candidateId);
out.writeLong(requestVote.lastLogIndex);
out.writeLong(requestVote.lastLogTerm);
}
示例14: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {
// VERSION
out.writeByte( 0 );
// SUPER
super.writeExternal( out );
// NO_ENTRY_KEY
out.writeShort( no_entry_key );
// NO_ENTRY_VALUE
out.writeLong( no_entry_value );
}
示例15: writeExternal
import java.io.ObjectOutput; //导入方法依赖的package包/类
/**
* Writes this object to the serialized stream.
*
* @param objectOutput
* @throws IOException
*/
public void writeExternal(ObjectOutput objectOutput)
throws IOException
{
objectOutput.writeLong(serialVersionUID);
objectOutput.writeObject(_wrapped);
objectOutput.writeObject(_label);
}