Java Code Examples for java.io.ObjectOutput.writeFloat()

The following are Jave code examples for showing how to use writeFloat() of the java.io.ObjectOutput class. You can vote up the examples you like. Your votes will be used in our system to get more good examples.
Example 1
Project: xcc   File: TShortHashSet.java   Source Code and License Vote up 6 votes
/** {@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] );
        }
    }
}
 
Example 2
Project: HCFCore   File: TFloatArrayList.java   Source Code and License Vote up 6 votes
public void writeExternal( ObjectOutput out ) throws IOException {
	// VERSION
	out.writeByte( 0 );

	// POSITION
	out.writeInt( _pos );

	// NO_ENTRY_VALUE
	out.writeFloat( no_entry_value );

	// ENTRIES
	int len = _data.length;
	out.writeInt( len );
	for( int i = 0; i < len; i++ ) {
		out.writeFloat( _data[ i ] );
	}
}
 
Example 3
Project: xcc   File: TDoubleHashSet.java   Source Code and License Vote up 6 votes
/** {@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.writeDouble( no_entry_value );

	// ENTRIES
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            out.writeDouble( _set[i] );
        }
    }
}
 
Example 4
Project: HCFCore   File: TLongHashSet.java   Source Code and License Vote up 6 votes
/** {@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.writeLong( no_entry_value );

	// ENTRIES
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            out.writeLong( _set[i] );
        }
    }
}
 
Example 5
Project: HCFCore   File: TDoubleHashSet.java   Source Code and License Vote up 6 votes
/** {@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.writeDouble( no_entry_value );

	// ENTRIES
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            out.writeDouble( _set[i] );
        }
    }
}
 
Example 6
Project: HCFCore   File: TFloatHashSet.java   Source Code and License Vote up 6 votes
/** {@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.writeFloat( no_entry_value );

	// ENTRIES
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            out.writeFloat( _set[i] );
        }
    }
}
 
Example 7
Project: HCFCore   File: TCharHashSet.java   Source Code and License Vote up 6 votes
/** {@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.writeChar( no_entry_value );

	// ENTRIES
    for ( int i = _states.length; i-- > 0; ) {
        if ( _states[i] == FULL ) {
            out.writeChar( _set[i] );
        }
    }
}
 
Example 8
Project: HCFCore   File: TLongFloatHash.java   Source Code and License Vote up 5 votes
/** {@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 );
}
 
Example 9
Project: HCFCore   File: TFloatCharHash.java   Source Code and License Vote up 5 votes
/** {@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.writeChar( no_entry_value );
}
 
Example 10
Project: xcc   File: TFloatShortHash.java   Source Code and License Vote up 5 votes
/** {@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.writeShort( no_entry_value );
}
 
Example 11
Project: HCFCore   File: TFloatShortHash.java   Source Code and License Vote up 5 votes
/** {@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.writeShort( no_entry_value );
}
 
Example 12
Project: HCFCore   File: TFloatDoubleHash.java   Source Code and License Vote up 5 votes
/** {@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.writeDouble( no_entry_value );
}
 
Example 13
Project: jdk8u-jdk   File: ExternObjTrees.java   Source Code and License Vote up 5 votes
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeBoolean(z);
    out.writeByte(b);
    out.writeChar(c);
    out.writeShort(s);
    out.writeInt(i);
    out.writeFloat(f);
    out.writeLong(j);
    out.writeDouble(d);
    out.writeObject(str);
    out.writeObject(parent);
    out.writeObject(left);
    out.writeObject(right);
}
 
Example 14
Project: HCFCore   File: TByteFloatHash.java   Source Code and License Vote up 5 votes
/** {@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.writeFloat( no_entry_value );
}
 
Example 15
Project: HCFCore   File: TFloatDoubleHash.java   Source Code and License Vote up 5 votes
/** {@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.writeDouble( no_entry_value );
}
 
Example 16
Project: openjdk-jdk10   File: ExternObjTrees.java   Source Code and License Vote up 5 votes
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeBoolean(z);
    out.writeByte(b);
    out.writeChar(c);
    out.writeShort(s);
    out.writeInt(i);
    out.writeFloat(f);
    out.writeLong(j);
    out.writeDouble(d);
    out.writeObject(str);
    out.writeObject(parent);
    out.writeObject(left);
    out.writeObject(right);
}
 
Example 17
Project: xcc   File: TFloatFloatHash.java   Source Code and License Vote up 5 votes
/** {@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.writeFloat( no_entry_value );
}
 
Example 18
Project: xcc   File: TByteFloatHash.java   Source Code and License Vote up 5 votes
/** {@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.writeFloat( no_entry_value );
}
 
Example 19
Project: HCFCore   File: TFloatFloatHash.java   Source Code and License Vote up 5 votes
/** {@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.writeFloat( no_entry_value );
}
 
Example 20
Project: Ultraino   File: Quaternion.java   Source Code and License Vote up 3 votes
/**
 * <code>writeExternal</code> writes this quaternion out to a
 * <code>ObjectOutput</code> object. NOTE: Used with serialization. Not to
 * be called manually.
 * 
 * @param out
 *            the object to write to.
 * @throws IOException
 *             if writing to the ObjectOutput fails.
 * @see java.io.Externalizable
 */
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeFloat(x);
    out.writeFloat(y);
    out.writeFloat(z);
    out.writeFloat(w);
}