Example usage for java.io ObjectOutput writeInt

List of usage examples for java.io ObjectOutput writeInt

Introduction

In this page you can find the example usage for java.io ObjectOutput writeInt.

Prototype

void writeInt(int v) throws IOException;

Source Link

Document

Writes an int value, which is comprised of four bytes, to the output stream.

Usage

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

public void writeExternal(ObjectOutput out) throws IOException {
    out.writeObject(targetClass);/*  ww  w.j  a  va  2 s.c o m*/
    out.writeInt(memberUpdaterIndex);
    out.writeObject(params);
    out.writeObject(metaData);
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    final int len = idxNames.length;
    out.writeInt(len);
    for (int i = 0; i < len; i++) {
        IOUtils.writeString(idxNames[i], out);
    }//from ww w . j  a  v a 2s . co m
    out.writeBoolean(async);
}

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

@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(getEndMillis());/*from w  ww.  j a v  a  2 s  .  c  o m*/
    out.writeInt(getTotalMessageCount());
    out.writeInt(getTotalMessageErrorCount());
    out.writeLong(getTotalMessageSize());
    out.writeLong(getStartMillis());
}

From source file:ByteArray.java

/**
 * Write the byte array out w/o compression
 *
 * @param out write bytes here./*from w  w w . j av a2  s.com*/
 *
 * @exception IOException   thrown on error
 */
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeInt(length);
    out.write(array, offset, length);
}

From source file:MutableInt.java

public void writeExternal(ObjectOutput out) throws IOException {
    out.writeInt(_value);
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    IOUtils.writeString(idxName, out);//from   w w w. j  a v  a2 s. c  o m
    out.writeInt(keys.size());
    for (byte[] b : keys) {
        IOUtils.writeBytes(b, out);
    }
    out.writeBoolean(async);
}

From source file:org.mrgeo.hdfs.tile.Splits.java

@Override
final public void writeExternal(ObjectOutput out) throws IOException {
    out.writeInt(splits.length);
    for (SplitInfo split : splits) {
        split.writeExternal(out);//  w  w  w  . ja  v a2 s  .c o m
    }
}

From source file:org.wso2.carbon.ml.core.spark.models.MLMatrixFactorizationModel.java

@Override
public void writeExternal(ObjectOutput out) throws IOException {
    // can't save the whole MatrixFactorizationModel, hence saving relevant attributes separately.
    out.writeInt(model.rank());
    out.writeObject(model.userFeatures().toJavaRDD().collect());
    out.writeObject(model.productFeatures().toJavaRDD().collect());

    if (log.isDebugEnabled()) {
        log.debug("Rank, user features and product features of MatrixFactorizationModel were serialized "
                + "successfully.");
    }//from   w  w  w.j  a v  a 2  s.c  o m
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    IOUtils.writeString(_idxName, out);/*from  ww w  .ja va 2  s .  c  o  m*/
    final int keylen = _keys.size();
    out.writeInt(keylen);
    for (int i = 0; i < keylen; i++) {
        byte[] k = _keys.get(i);
        IOUtils.writeBytes(k, out);
    }
}

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.
 * /*w  w w . j ava2 s  .c  om*/
 * {@inheritDoc}
 */
public void writeExternal(ObjectOutput oo) throws IOException {
    oo.writeObject(this.quantitationType);
    byte[] serializedValues = CaArrayUtils.serialize(getSerializableValues());
    oo.writeInt(serializedValues.length);
    oo.write(serializedValues, 0, serializedValues.length);
}