當前位置: 首頁>>代碼示例>>Java>>正文


Java ObjectOutput.writeLong方法代碼示例

本文整理匯總了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);
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:22,代碼來源:InstallSnapshot.java

示例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);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:24,代碼來源:XEnrollment.java

示例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);
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:20,代碼來源:Snapshot.java

示例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());
}
 
開發者ID:Naoghuman,項目名稱:ABC-List,代碼行數:11,代碼來源:Link.java

示例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 );
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:15,代碼來源:TLongDoubleHash.java

示例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 );
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:15,代碼來源:TLongCharHash.java

示例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 );
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:15,代碼來源:TLongFloatHash.java

示例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 );
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:15,代碼來源:TDoubleLongHash.java

示例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 );
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:15,代碼來源:TByteLongHash.java

示例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);
}
 
開發者ID:Luodian,項目名稱:Higher-Cloud-Computing-Project,代碼行數:8,代碼來源:MatrixBlockKey.java

示例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 );
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:15,代碼來源:TLongLongHash.java

示例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);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:15,代碼來源:XDistribution.java

示例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);
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:8,代碼來源:RequestVote.java

示例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 );
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:15,代碼來源:TShortLongHash.java

示例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);
}
 
開發者ID:apache,項目名稱:myfaces-trinidad,代碼行數:14,代碼來源:FacesMessageWrapper.java


注:本文中的java.io.ObjectOutput.writeLong方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。