Example usage for java.io ObjectOutputStream writeBoolean

List of usage examples for java.io ObjectOutputStream writeBoolean

Introduction

In this page you can find the example usage for java.io ObjectOutputStream writeBoolean.

Prototype

public void writeBoolean(boolean val) throws IOException 

Source Link

Document

Writes a boolean.

Usage

From source file:captureplugin.drivers.defaultdriver.ParamEntry.java

/**
 * Save data to Stream/* www.j av a2s. c  o m*/
 * @param out save to this stream
 * @throws IOException during save operation
 */
public void writeData(ObjectOutputStream out) throws IOException {
    out.writeInt(2);
    out.writeObject(mName);
    out.writeObject(mParam);
    out.writeBoolean(mEnabled);
}

From source file:cn.caimatou.canting.utils.http.asynchttp.SerializableCookie.java

private void writeObject(ObjectOutputStream out) throws IOException {
    out.writeObject(cookie.getName());//from w  w  w  . j  av a2  s . co m
    out.writeObject(cookie.getValue());
    out.writeObject(cookie.getComment());
    out.writeObject(cookie.getDomain());
    out.writeObject(cookie.getExpiryDate());
    out.writeObject(cookie.getPath());
    out.writeInt(cookie.getVersion());
    out.writeBoolean(cookie.isSecure());
}

From source file:BooleanArrayList.java

private void writeObject(ObjectOutputStream out) throws IOException {
    out.defaultWriteObject();//from w w w  .j  av a 2 s .c o m
    out.writeInt(array.length);
    for (int i = 0; i < size; i++) {
        out.writeBoolean(array[i]);
    }
}

From source file:com.ab.http.SerializableCookie.java

/**
 * Write object./*from  w  w  w . j a  va 2  s.c  o  m*/
 *
 * @param out the out
 * @throws IOException Signals that an I/O exception has occurred.
 */
private void writeObject(ObjectOutputStream out) throws IOException {
    out.writeObject(cookie.getName());
    out.writeObject(cookie.getValue());
    out.writeObject(cookie.getComment());
    out.writeObject(cookie.getDomain());
    out.writeObject(cookie.getExpiryDate());
    out.writeObject(cookie.getPath());
    out.writeInt(cookie.getVersion());
    out.writeBoolean(cookie.isSecure());
}

From source file:com.blazeroni.reddit.http.SerializableCookie.java

private void writeObject(ObjectOutputStream out) throws IOException {
    out.writeObject(this.cookie.getName());
    out.writeObject(this.cookie.getValue());
    out.writeObject(this.cookie.getComment());
    out.writeObject(this.cookie.getDomain());
    out.writeObject(this.cookie.getExpiryDate());
    out.writeObject(this.cookie.getPath());
    out.writeInt(this.cookie.getVersion());
    out.writeBoolean(this.cookie.isSecure());
}

From source file:net.vleu.par.android.rpc.SerializableCookie.java

private void writeObject(final ObjectOutputStream out) throws IOException {
    out.writeObject(this.cookie.getName());
    out.writeObject(this.cookie.getValue());
    out.writeObject(this.cookie.getComment());
    out.writeObject(this.cookie.getDomain());
    out.writeObject(this.cookie.getExpiryDate());
    out.writeObject(this.cookie.getPath());
    out.writeInt(this.cookie.getVersion());
    out.writeBoolean(this.cookie.isSecure());
}

From source file:com.inmobi.grill.driver.hive.TestRemoteHiveDriver.java

private byte[] persistContext(QueryContext ctx) throws IOException {
    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    ObjectOutputStream out = new ObjectOutputStream(baos);
    try {/* ww  w .j a  v a2s  . c  om*/
        out.writeObject(ctx);
        boolean isDriverAvailable = (ctx.getSelectedDriver() != null);
        out.writeBoolean(isDriverAvailable);
        if (isDriverAvailable) {
            out.writeUTF(ctx.getSelectedDriver().getClass().getName());
        }
    } finally {
        out.flush();
        out.close();
        baos.close();
    }

    return baos.toByteArray();
}

From source file:ti.modules.titanium.network.TiCookieStore.java

private String encodeCookie(Cookie cookie) {

    ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
    try {/*from www  .j av a 2  s  . com*/

        ObjectOutputStream objectOutputStream = new ObjectOutputStream(outputStream);
        objectOutputStream.writeObject(cookie.getName());
        objectOutputStream.writeObject(cookie.getValue());
        objectOutputStream.writeObject(cookie.getComment());
        objectOutputStream.writeObject(cookie.getDomain());
        objectOutputStream.writeInt(cookie.getVersion());
        objectOutputStream.writeBoolean(cookie.isSecure());
        objectOutputStream.writeObject(cookie.getExpiryDate());
        objectOutputStream.writeObject(cookie.getPath());

    } catch (Exception e) {
        Log.w(TAG, "Failed to encode cookie", Log.DEBUG_MODE);
        return null;
    }

    return new String(Hex.encodeHex(outputStream.toByteArray()));
}

From source file:com.projity.pm.task.TaskSnapshot.java

public void serialize(ObjectOutputStream s) throws IOException {
    currentSchedule.serialize(s);/*from   ww w.  j  av a  2s  . com*/
    //s.writeObject(hasAssignments);
    s.writeDouble(fixedCost);
    s.writeInt(fixedCostAccrual);
    s.writeBoolean(ignoreResourceCalendar);
    s.writeInt(hasAssignments.getSchedulingType());
    s.writeBoolean(hasAssignments.isEffortDriven());
}

From source file:com.lillicoder.newsblurry.net.SerializableCookie.java

/**
 *
 * Serialization methods./*  w  w  w .jav  a2 s . c om*/
 * 
 */
private void writeObject(ObjectOutputStream out) throws IOException {
    Cookie cookie = this.getCookie();

    // Write all values that can later be restored.
    // This means excluding comment URL, persistence value,
    // and ports.
    out.writeObject(cookie.getComment());
    out.writeObject(cookie.getDomain());
    out.writeObject(cookie.getExpiryDate());
    out.writeObject(cookie.getName());
    out.writeObject(cookie.getPath());
    out.writeObject(cookie.getValue());
    out.writeInt(cookie.getVersion());
    out.writeBoolean(cookie.isSecure());
}