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


Java ObjectOutput.writeInt方法代碼示例

本文整理匯總了Java中java.io.ObjectOutput.writeInt方法的典型用法代碼示例。如果您正苦於以下問題:Java ObjectOutput.writeInt方法的具體用法?Java ObjectOutput.writeInt怎麽用?Java ObjectOutput.writeInt使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在java.io.ObjectOutput的用法示例。


在下文中一共展示了ObjectOutput.writeInt方法的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。

示例1: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION
    out.writeByte(1);

    // NOTE: Super was not written in version 0
    super.writeExternal(out);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = _set.length; i-- > 0;) {
        if (_set[i] != REMOVED && _set[i] != FREE) {
            out.writeObject(_set[i]);
            out.writeObject(_values[i]);
        }
    }
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:19,代碼來源:THashMap.java

示例2: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
/** {@inheritDoc} */
public void writeExternal( ObjectOutput out ) throws IOException {

	// VERSION
	out.writeByte( 1 );

	// SUPER
	super.writeExternal( out );

	// NUMBER OF ENTRIES
	out.writeInt( _size );

    // LOAD FACTOR -- Added version 1
    out.writeFloat( _loadFactor );

    // NO ENTRY VALUE -- Added version 1
    out.writeShort( no_entry_value );

	// ENTRIES
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            out.writeShort( _set[i] );
        }
    }
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:26,代碼來源:TShortHashSet.java

示例3: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeBoolean(reply);
    out.writeInt(uuid.length);
    out.write(uuid, 0, uuid.length);
    out.writeInt(rpcId.length);
    out.write(rpcId, 0, rpcId.length);
    out.writeObject(message);
}
 
開發者ID:liaokailin,項目名稱:tomcat7,代碼行數:10,代碼來源:RpcMessage.java

示例4: 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.writeInt( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeChar( no_entry_value );
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:15,代碼來源:TIntCharHash.java

示例5: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
@Override
public void writeExternal(final ObjectOutput out) throws IOException {
    super.writeExternal(out);

    out.writeObject(Serialization.serializedActorPath(backend));
    out.writeInt(maxMessages);

    out.writeInt(alternates.size());
    for (ActorSelection b : alternates) {
        out.writeObject(b.toSerializationFormat());
    }
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:13,代碼來源:ConnectClientSuccessProxyV1.java

示例6: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
/** {@inheritDoc} */
public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION
    out.writeByte(0);

    // NO_ENTRY_VALUE
    out.writeLong(no_entry_value);

    // ENTRIES
    out.writeInt(size);
    for (TLongIterator iterator = iterator(); iterator.hasNext();) {
        long next = iterator.next();
        out.writeLong(next);
    }
}
 
開發者ID:funkemunky,項目名稱:HCFCore,代碼行數:16,代碼來源:TLongLinkedList.java

示例7: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
void writeExternal(ObjectOutput out) throws IOException {
    // HijrahChronology is implicit in the Hijrah_DATE_TYPE
    out.writeObject(getChronology());
    out.writeInt(get(YEAR));
    out.writeByte(get(MONTH_OF_YEAR));
    out.writeByte(get(DAY_OF_MONTH));
}
 
開發者ID:AdoptOpenJDK,項目名稱:openjdk-jdk10,代碼行數:8,代碼來源:HijrahDate.java

示例8: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
/** {@inheritDoc} */
public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION
    out.writeByte(0);

    // NO_ENTRY_VALUE
    out.writeByte(no_entry_value);

    // ENTRIES
    out.writeInt(size);
    for (TByteIterator iterator = iterator(); iterator.hasNext();) {
        byte next = iterator.next();
        out.writeByte(next);
    }
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:16,代碼來源:TByteLinkedList.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.writeFloat( no_entry_key );

	// NO_ENTRY_VALUE
	out.writeInt( no_entry_value );
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:15,代碼來源:TFloatIntHash.java

示例10: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
    out.writeInt(size);
    out.writeInt(ptrInitHash);

    for (int i = 0; i < size; i++)
        out.writeDouble(get(i));
}
 
開發者ID:Luodian,項目名稱:Higher-Cloud-Computing-Project,代碼行數:9,代碼來源:DenseLocalOffHeapVectorStorage.java

示例11: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	out.writeInt(uuid.length);
	out.write(uuid, 0, uuid.length);
	out.writeInt(rpcId.length);
	out.write(rpcId, 0, rpcId.length);
}
 
開發者ID:how2j,項目名稱:lazycat,代碼行數:8,代碼來源:RpcMessage.java

示例12: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(datastoreSnapshot.type);
    out.writeObject(datastoreSnapshot.shardManagerSnapshot);

    out.writeInt(datastoreSnapshot.shardSnapshots.size());
    for (ShardSnapshot shardSnapshot: datastoreSnapshot.shardSnapshots) {
        out.writeObject(shardSnapshot);
    }
}
 
開發者ID:hashsdn,項目名稱:hashsdn-controller,代碼行數:11,代碼來源:DatastoreSnapshot.java

示例13: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
/** {@inheritDoc} */
@Override public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(dlg);

    out.writeInt(rowOff);
    out.writeInt(colOff);

    out.writeInt(rows);
    out.writeInt(cols);
}
 
開發者ID:Luodian,項目名稱:Higher-Cloud-Computing-Project,代碼行數:11,代碼來源:MatrixDelegateStorage.java

示例14: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
@Override
public void writeExternal(ObjectOutput out) throws IOException {
	out.writeLong(iRequestId);
	out.writeInt(iPriority);
	out.writeBoolean(iAlternative);
	out.writeLong(iStudentId);
}
 
開發者ID:Jenner4S,項目名稱:unitimes,代碼行數:8,代碼來源:XRequest.java

示例15: writeExternal

import java.io.ObjectOutput; //導入方法依賴的package包/類
/** {@inheritDoc} */
public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION
    out.writeByte(0);

    // NO_ENTRY_VALUE
    out.writeFloat(no_entry_value);

    // ENTRIES
    out.writeInt(size);
    for (TFloatIterator iterator = iterator(); iterator.hasNext();) {
        float next = iterator.next();
        out.writeFloat(next);
    }
}
 
開發者ID:JianpingZeng,項目名稱:xcc,代碼行數:16,代碼來源:TFloatLinkedList.java


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