Example usage for java.io ObjectOutput writeByte

List of usage examples for java.io ObjectOutput writeByte

Introduction

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

Prototype

void writeByte(int v) throws IOException;

Source Link

Document

Writes to the output stream the eight low- order bits of the argument v.

Usage

From source file:com.conwet.silbops.msg.UnsubscribeMsg.java

@Override
public void writeExternal(ObjectOutput output) throws IOException {

    subscription.writeExternal(output);//from ww  w.  j a va2  s . c o  m
    output.writeByte(uncovered.size());

    for (Subscription uncov : uncovered) {

        uncov.writeExternal(output);
    }
}

From source file:com.delphix.session.impl.frame.SerialNumber.java

@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeByte(serialBits);

    if (serialBits < Byte.SIZE) {
        out.writeByte((int) serialNumber);
    } else if (serialBits < Short.SIZE) {
        out.writeShort((int) serialNumber);
    } else if (serialBits < Integer.SIZE) {
        out.writeInt((int) serialNumber);
    } else {//from  www.java  2s  . c o m
        out.writeLong(serialNumber);
    }
}

From source file:com.conwet.silbops.msg.UnadvertiseMsg.java

@Override
public void writeExternal(ObjectOutput output) throws IOException {

    advertise.writeExternal(output);/*from  w w w. j  a va2  s.  c  o m*/
    context.writeExternal(output);

    output.writeByte(uncovered.size());

    for (Advertise uncov : this.uncovered) {

        uncov.writeExternal(output);
    }
}

From source file:com.aol.advertising.qiao.util.cache.ValueWrapper.java

@Override
public void writeExternal(ObjectOutput out) throws IOException {
    out.writeLong(this.insertionTime);
    out.writeLong(this.lastAccessTime);
    out.writeInt(this.timeout);
    out.writeByte(this.isModified);
    out.writeObject(value);/*from  ww  w  .  j av  a  2  s .  com*/
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION/*w w  w .j  a  v  a2s  .  c o m*/
    out.writeByte(0);

    // SUPER
    super.writeExternal(out);

    // STRATEGY
    out.writeObject(strategy);

    // NO_ENTRY_VALUE
    out.writeByte(no_entry_value);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = _set.length; i-- > 0;) {
        if (_set[i] != REMOVED && _set[i] != FREE) {
            out.writeObject(_set[i]);
            out.writeByte(_values[i]);
        }
    }
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION//from   ww  w  .j a v a 2s.  c  o  m
    out.writeByte(0);

    // SUPER
    super.writeExternal(out);

    // STRATEGY
    out.writeObject(strategy);

    // NO_ENTRY_VALUE
    out.writeChar(no_entry_value);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = _set.length; i-- > 0;) {
        if (_set[i] != REMOVED && _set[i] != FREE) {
            out.writeObject(_set[i]);
            out.writeChar(_values[i]);
        }
    }
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION/*w w w.  ja va 2s.c o  m*/
    out.writeByte(0);

    // SUPER
    super.writeExternal(out);

    // STRATEGY
    out.writeObject(strategy);

    // NO_ENTRY_VALUE
    out.writeDouble(no_entry_value);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = _set.length; i-- > 0;) {
        if (_set[i] != REMOVED && _set[i] != FREE) {
            out.writeObject(_set[i]);
            out.writeDouble(_values[i]);
        }
    }
}

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

public void writeExternal(ObjectOutput out) throws IOException {
    // VERSION/*from   w w w .ja  v a 2 s  .co  m*/
    out.writeByte(0);

    // SUPER
    super.writeExternal(out);

    // STRATEGY
    out.writeObject(strategy);

    // NO_ENTRY_VALUE
    out.writeFloat(no_entry_value);

    // NUMBER OF ENTRIES
    out.writeInt(_size);

    // ENTRIES
    for (int i = _set.length; i-- > 0;) {
        if (_set[i] != REMOVED && _set[i] != FREE) {
            out.writeObject(_set[i]);
            out.writeFloat(_values[i]);
        }
    }
}