Example usage for java.io ObjectInput readFloat

List of usage examples for java.io ObjectInput readFloat

Introduction

In this page you can find the example usage for java.io ObjectInput readFloat.

Prototype

float readFloat() throws IOException;

Source Link

Document

Reads four input bytes and returns a float value.

Usage

From source file:TransferableScribblePane.java

public void readExternal(java.io.ObjectInput in) throws java.io.IOException, ClassNotFoundException {
    this.x0 = in.readFloat();
    this.y0 = in.readFloat();
    this.numsegs = in.readInt();
    this.coords = new float[numsegs * 2];
    for (int i = 0; i < numsegs * 2; i++)
        coords[i] = in.readFloat();// w w w. ja v  a 2  s .  c om
}

From source file:gnu.trove.map.custom_hash.TObjectFloatCustomHashMap.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {

    // VERSION//from   w ww.ja v a 2  s  .  co  m
    in.readByte();

    // SUPER
    super.readExternal(in);

    // STRATEGY
    strategy = (HashingStrategy<K>) in.readObject();

    // NO_ENTRY_VALUE
    no_entry_value = in.readFloat();

    // NUMBER OF ENTRIES
    int size = in.readInt();
    setUp(size);

    // ENTRIES
    while (size-- > 0) {
        //noinspection unchecked
        K key = (K) in.readObject();
        float val = in.readFloat();
        put(key, val);
    }
}

From source file:com.joey.software.regionSelectionToolkit.controlers.ImageProfileTool.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    setBlockUpdate(true);//w  ww. j  a v a  2  s  .  co  m
    int version = in.readInt();

    dataPoints = in.readInt();
    crossColor = new Color(in.readInt());
    pointSize = in.readDouble();

    value = new float[in.readInt()];
    for (int i = 0; i < value.length; i++) {
        value[i] = in.readFloat();
    }

    selectionData = new float[in.readInt()];
    for (int i = 0; i < selectionData.length; i++) {
        selectionData[i] = in.readFloat();
    }

    useData = new boolean[in.readInt()];
    for (int i = 0; i < useData.length; i++) {
        useData[i] = in.readBoolean();
    }

    offset.setValue(in.readDouble());
    showOffset.setSelected(in.readBoolean());

    setBlockUpdate(false);
    // dataPoints = p.dataPoints;
    // crossColor = new Color(p.crossColor.getRGB());
    // pointSize = p.pointSize;
    // value = new float[p.value.length];
    // for (int i = 0; i < value.length; i++)
    // {
    // value[i] = p.value[i];
    // }
    //
    // selectionData = new float[p.selectionData.length];
    // for (int i = 0; i < selectionData.length; i++)
    // {
    // selectionData[i] = p.selectionData[i];
    // }
    //
    // useData = new boolean[p.useData.length];
    // for (int i = 0; i < useData.length; i++)
    // {
    // useData[i] = p.useData[i];
    // }
    //
    // offset.setValue(p.offset.getValue());
    // showOffset.setSelected(p.showOffset.isSelected());
}

From source file:xbird.engine.remote.RemoteFocus.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this._proxy = (IRemoteFocusProxy) in.readObject();
    this._fetchSize = in.readInt();
    this._fetchGrow = in.readFloat();
    this._fetchWatermark = in.readInt();
    this._fetchMethod = (FetchMethod) in.readObject();
}