Example usage for java.io ObjectInput readInt

List of usage examples for java.io ObjectInput readInt

Introduction

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

Prototype

int readInt() throws IOException;

Source Link

Document

Reads four input bytes and returns an int value.

Usage

From source file:gridool.dht.ops.AddGridNodeOperation.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    final int len = in.readInt();
    final byte[][] k = new byte[len][];
    for (int i = 0; i < len; i++) {
        k[i] = IOUtils.readBytes(in);//from   w  w  w.ja  v  a  2s.  c o m
    }
    this.keys = k;
    this.node = GridNodeInfo.readFrom(in);
}

From source file:Blip3.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    System.out.println("Blip3.readExternal");
    // You must do this:
    s = (String) in.readObject();
    i = in.readInt();
}

From source file:org.drools.CheeseEqual.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    type = (String) in.readObject();
    price = in.readInt();
}

From source file:org.taverna.server.master.common.Workflow.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    try {/*from  w w w.j a v  a2s .  c om*/
        int len = in.readInt();
        byte[] bytes = new byte[len];
        in.readFully(bytes);
        Reader r = new InputStreamReader(new InflaterInputStream(new ByteArrayInputStream(bytes)), ENCODING);
        Workflow w = (Workflow) unmarshaller.unmarshal(r);
        r.close();
        this.content = w.content;
        return;
    } catch (JAXBException e) {
        throw new IOException("failed to unmarshal", e);
    } catch (ClassCastException e) {
        throw new IOException("bizarre result of unmarshalling", e);
    }
}

From source file:bftsmart.consensus.TimestampValuePair.java

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

    timestamp = in.readInt();
    value = (byte[]) in.readObject();
}

From source file:ByteArray.java

/**
 * Read this object from a stream of stored objects.
 *
 * @param in read this./*from   w  ww. jav  a  2  s . c  om*/
 *
 * @exception IOException         thrown on error
 */
public void readExternal(ObjectInput in) throws IOException {
    int len = length = in.readInt();
    offset = 0;
    array = new byte[len];

    in.readFully(array, 0, len);
}

From source file:org.codehaus.wadi.servicespace.InvocationInfo.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    targetClass = (Class) in.readObject();
    memberUpdaterIndex = in.readInt();
    params = (Object[]) in.readObject();
    metaData = (InvocationMetaData) in.readObject();
}

From source file:com.adaptris.core.interceptor.MessageStatistic.java

@Override
public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    setEndMillis(in.readLong());//from w w w  .  j a v a 2  s  .  c o m
    setTotalMessageCount(in.readInt());
    setTotalMessageErrorCount(in.readInt());
    setTotalMessageSize(in.readLong());
    setStartMillis(in.readLong());
}

From source file:MutableInt.java

public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException {
    this._value = in.readInt();
}

From source file:gov.nih.nci.caarray.external.v1_0.data.AbstractDataColumn.java

/**
 * Optimizes the serialized form of this class by compressing the values array.
 * /*from   w  w  w.j  a  v  a2  s  .  c om*/
 * {@inheritDoc}
 */
public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException {
    this.quantitationType = (QuantitationType) oi.readObject();
    int valuesLength = oi.readInt();
    byte[] serializedValues = new byte[valuesLength];
    oi.readFully(serializedValues);
    setSerializableValues(CaArrayUtils.deserialize(serializedValues));
}