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

The following examples show how to use java.io.ObjectInput#readFloat() . These examples are extracted from open source projects. 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
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
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
/** {@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 Project: JOML   File: Rayf.java    License: 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 Project: unitime   File: XOverride.java    License: 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 Project: JOML   File: Matrix3f.java    License: 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 7
Source Project: JOML   File: LineSegmentf.java    License: 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 8
Source Project: gemfirexd-oss   File: SQLReal.java    License: 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 9
Source Project: JOML   File: Vector2f.java    License: MIT License 4 votes vote down vote up
public void readExternal(ObjectInput in) throws IOException,
        ClassNotFoundException {
    x = in.readFloat();
    y = in.readFloat();
}
 
Example 10
Source Project: JOML   File: Circlef.java    License: 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 11
/** @see java.io.Externalizable#readExternal */
public void readExternal(ObjectInput in) throws IOException {
	isNull = in.readBoolean();
       value = in.readFloat();
}
 
Example 12
Source Project: ignite   File: VisorCacheMetrics.java    License: 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 13
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 14
Source Project: JOML   File: Planef.java    License: 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 Project: JOML   File: Spheref.java    License: 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 16
Source Project: reladomo   File: FloatAttribute.java    License: 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 17
Source Project: reladomo   File: FloatUpdateWrapper.java    License: Apache License 2.0 4 votes vote down vote up
public void readParameter(ObjectInput in) throws IOException, ClassNotFoundException
{
    this.newValue = in.readFloat();
}
 
Example 18
/**
 * {@inheritDoc}
 */
public void readExternal(final ObjectInput in) throws IOException {

   value = in.readFloat();
}
 
Example 19
/**
 * <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
/**
 * 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();
}