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