Java Code Examples for java.io.ObjectInput#readFloat()

The following examples show how to use java.io.ObjectInput#readFloat() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ExternObjTrees.java    From jdk8u60 with GNU General Public License v2.0 6 votes vote down vote up
public void readExternal(ObjectInput in)
    throws IOException, ClassNotFoundException
{
    z = in.readBoolean();
    b = in.readByte();
    c = in.readChar();
    s = in.readShort();
    i = in.readInt();
    f = in.readFloat();
    j = in.readLong();
    d = in.readDouble();
    str = (String) in.readObject();
    parent = in.readObject();
    left = in.readObject();
    right = in.readObject();
}
 
Example 2
Source File: ExternObjTrees.java    From openjdk-jdk8u-backup with GNU General Public License v2.0 6 votes vote down vote up
public void readExternal(ObjectInput in)
    throws IOException, ClassNotFoundException
{
    z = in.readBoolean();
    b = in.readByte();
    c = in.readChar();
    s = in.readShort();
    i = in.readInt();
    f = in.readFloat();
    j = in.readLong();
    d = in.readDouble();
    str = (String) in.readObject();
    parent = in.readObject();
    left = in.readObject();
    right = in.readObject();
}
 
Example 3
Source File: IgniteComputeConfigVariationsFullApiTest.java    From ignite with Apache License 2.0 6 votes vote down vote up
/** {@inheritDoc} */
@Override public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    arg = in.readObject();

    isVal = in.readBoolean();
    bVal = in.readByte();
    cVal = in.readChar();
    sVal = in.readShort();
    intVal = in.readInt();
    lVal = in.readLong();
    fltVal = in.readFloat();
    dblVal = in.readDouble();
    strVal = (String)in.readObject();
    arrVal = (Object[])in.readObject();
    eVal = (TestJobEnum)in.readObject();
}
 
Example 4
Source File: Rayf.java    From JOML with MIT License 5 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    oX = in.readFloat();
    oY = in.readFloat();
    oZ = in.readFloat();
    dX = in.readFloat();
    dY = in.readFloat();
    dZ = in.readFloat();
}
 
Example 5
Source File: XOverride.java    From unitime with Apache License 2.0 5 votes vote down vote up
@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
	iExternalId = (String)in.readObject();
	iTimeStamp = (in.readBoolean() ? new Date(in.readLong()) : null);
	int status = in.readInt();
	iStatus = (status < 0 ? null : new Integer(status));
	iValue = (in.readBoolean() ? new Float(in.readFloat()) : null);
}
 
Example 6
Source File: SQLReal.java    From gemfirexd-oss with Apache License 2.0 5 votes vote down vote up
/** @see java.io.Externalizable#readExternal */
public void readExternal(ObjectInput in) throws IOException {
       // setValue(in.readFloat()); // can throw StandardException which we can't pass on
       // assume we wrote the value, so we can read it without problem, for now.
       value = in.readFloat();
       isnull = false;
}
 
Example 7
Source File: Matrix3f.java    From JOML with MIT License 5 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException {
    m00 = in.readFloat();
    m01 = in.readFloat();
    m02 = in.readFloat();
    m10 = in.readFloat();
    m11 = in.readFloat();
    m12 = in.readFloat();
    m20 = in.readFloat();
    m21 = in.readFloat();
    m22 = in.readFloat();
}
 
Example 8
Source File: LineSegmentf.java    From JOML with MIT License 5 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    aX = in.readFloat();
    aY = in.readFloat();
    aZ = in.readFloat();
    bX = in.readFloat();
    bY = in.readFloat();
    bZ = in.readFloat();
}
 
Example 9
Source File: PassFloatByReferenceBinary.java    From cacheonix-core with GNU Lesser General Public License v2.1 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public void readExternal(final ObjectInput in) throws IOException {

   value = in.readFloat();
}
 
Example 10
Source File: Vector2f.java    From JOML with MIT License 4 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    x = in.readFloat();
    y = in.readFloat();
}
 
Example 11
Source File: FloatUpdateWrapper.java    From reladomo with Apache License 2.0 4 votes vote down vote up
public void readParameter(ObjectInput in) throws IOException, ClassNotFoundException
{
    this.newValue = in.readFloat();
}
 
Example 12
Source File: FloatAttribute.java    From reladomo with Apache License 2.0 4 votes vote down vote up
@Override
public Nullable deserializeNonNullAggregateDataValue(ObjectInput in) throws IOException, ClassNotFoundException
{
    return new MutableFloat(in.readFloat());
}
 
Example 13
Source File: Spheref.java    From JOML with MIT License 4 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    x = in.readFloat();
    y = in.readFloat();
    z = in.readFloat();
    r = in.readFloat();
}
 
Example 14
Source File: Planef.java    From JOML with MIT License 4 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    a = in.readFloat();
    b = in.readFloat();
    c = in.readFloat();
    d = in.readFloat();
}
 
Example 15
Source File: Long2IntOpenHashTable.java    From incubator-hivemall with Apache License 2.0 4 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this._loadFactor = in.readFloat();
    this._growFactor = in.readFloat();
    final int used = in.readInt();
    this._defaultReturnValue = in.readInt();

    final int newCapacity = Primes.findLeastPrimeNumber(Math.round(used * 1.7f));
    final long[] keys = new long[newCapacity];
    final int[] values = new int[newCapacity];
    final byte[] states = new byte[newCapacity];
    for (int i = 0; i < used; i++) {
        final long k = in.readLong();
        final int v = in.readInt();
        final int hash = keyHash(k);
        int keyIdx = hash % newCapacity;
        if (states[keyIdx] != FREE) {// second hashing
            final int decr = 1 + (hash % (newCapacity - 2));
            final int loopIndex = keyIdx;
            do {
                keyIdx -= decr;
                if (keyIdx < 0) {
                    keyIdx += newCapacity;
                }
                if (keyIdx == loopIndex) {
                    throw new IllegalStateException(
                        "Detected infinite loop where key=" + k + ", keyIdx=" + keyIdx);
                }
            } while (states[keyIdx] != FREE);
        }
        keys[keyIdx] = k;
        values[keyIdx] = v;
        states[keyIdx] = FULL;
    }
    this._keys = keys;
    this._values = values;
    this._states = states;
    this._used = used;
    this._freeEntries = newCapacity - used;
    this._growThreshold = Math.round(newCapacity * _loadFactor);
    this._shrinkThreshold = Math.round(newCapacity * SHRINK_FACTOR);
}
 
Example 16
Source File: VisorCacheMetrics.java    From ignite with Apache License 2.0 4 votes vote down vote up
/** {@inheritDoc} */
@Override protected void readExternalData(byte protoVer, ObjectInput in) throws IOException, ClassNotFoundException {
    name = U.readString(in);
    mode = CacheMode.fromOrdinal(in.readByte());
    sys = in.readBoolean();
    size = in.readInt();
    keySize = in.readInt();
    reads = in.readLong();
    avgReadTime = in.readFloat();
    writes = in.readLong();
    hits = in.readLong();
    misses = in.readLong();
    txCommits = in.readLong();
    avgTxCommitTime = in.readFloat();
    txRollbacks = in.readLong();
    avgTxRollbackTime = in.readFloat();
    puts = in.readLong();
    avgPutTime = in.readFloat();
    removals = in.readLong();
    avgRemovalTime = in.readFloat();
    evictions = in.readLong();
    readsPerSec = in.readInt();
    putsPerSec = in.readInt();
    removalsPerSec = in.readInt();
    commitsPerSec = in.readInt();
    rollbacksPerSec = in.readInt();
    dhtEvictQueueCurrSize = in.readInt();

    txThreadMapSize = in.readInt();
    txXidMapSize = in.readInt();
    txCommitQueueSize = in.readInt();
    txPrepareQueueSize = in.readInt();
    txStartVerCountsSize = in.readInt();
    txCommittedVersionsSize = in.readInt();
    txRolledbackVersionsSize = in.readInt();
    txDhtThreadMapSize = in.readInt();
    txDhtXidMapSize = in.readInt();
    txDhtCommitQueueSize = in.readInt();
    txDhtPrepareQueueSize = in.readInt();
    txDhtStartVerCountsSize = in.readInt();
    txDhtCommittedVersionsSize = in.readInt();
    txDhtRolledbackVersionsSize = in.readInt();

    heapEntriesCnt = in.readLong();
    offHeapAllocatedSize = in.readLong();
    offHeapEntriesCnt = in.readLong();
    offHeapPrimaryEntriesCnt = in.readLong();

    totalPartsCnt = in.readInt();
    rebalancingPartsCnt = in.readInt();
    keysToRebalanceLeft = in.readLong();
    rebalancingKeysRate = in.readLong();
    rebalancingBytesRate = in.readLong();

    qryMetrics = (VisorQueryMetrics)in.readObject();

    if (in.available() > 0)
        cacheSize = in.readLong();

    if (protoVer > V1) {
        rebalancedKeys = in.readLong();
        estimatedRebalancingKeys = in.readLong();
    }
}
 
Example 17
Source File: SQLReal.java    From spliceengine with GNU Affero General Public License v3.0 4 votes vote down vote up
/** @see java.io.Externalizable#readExternal */
public void readExternal(ObjectInput in) throws IOException {
	isNull = in.readBoolean();
       value = in.readFloat();
}
 
Example 18
Source File: Circlef.java    From JOML with MIT License 4 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    x = in.readFloat();
    y = in.readFloat();
    r = in.readFloat();
}
 
Example 19
Source File: Quaternion.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 3 votes vote down vote up
/**
 * <code>readExternal</code> builds a quaternion from an
 * <code>ObjectInput</code> object. <br>
 * NOTE: Used with serialization. Not to be called manually.
 * 
 * @param in
 *            the ObjectInput value to read from.
 * @throws IOException
 *             if the ObjectInput value has problems reading a float.
 * @see java.io.Externalizable
 */
public void readExternal(ObjectInput in) throws IOException {
    x = in.readFloat();
    y = in.readFloat();
    z = in.readFloat();
    w = in.readFloat();
}
 
Example 20
Source File: Vector2f.java    From MikuMikuStudio with BSD 2-Clause "Simplified" License 2 votes vote down vote up
/**
 * Used with serialization. Not to be called manually.
 * 
 * @param in
 *            ObjectInput
 * @throws IOException
 * @throws ClassNotFoundException
 * @see java.io.Externalizable
 */
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    x = in.readFloat();
    y = in.readFloat();
}