Example usage for java.io ObjectOutputStream defaultWriteObject

List of usage examples for java.io ObjectOutputStream defaultWriteObject

Introduction

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

Prototype

public void defaultWriteObject() throws IOException 

Source Link

Document

Write the non-static and non-transient fields of the current class to this stream.

Usage

From source file:ConcurrentHashSet.java

/**
 * //from   www.  j a va2 s  . co m
 * @param s
 * @throws java.io.IOException
 */
private void writeObject(java.io.ObjectOutputStream s) throws java.io.IOException {
    s.defaultWriteObject();
    s.writeInt(map.size());

    for (Iterator<E> i = map.keySet().iterator(); i.hasNext();) {
        s.writeObject(i.next());
    }
}

From source file:com.dataartisans.flink.dataflow.translation.functions.FlinkDoFnFunction.java

private void writeObject(ObjectOutputStream out) throws IOException, ClassNotFoundException {
    out.defaultWriteObject();
    ObjectMapper mapper = new ObjectMapper();
    mapper.writeValue(out, options);/* w  w  w .jav  a  2s  .c o m*/
}

From source file:org.LexGrid.LexBIG.Impl.LexBIGServiceMetadataImpl.java

private void writeObject(ObjectOutputStream out) throws IOException {
    out.defaultWriteObject();

    ByteArrayOutputStream baos = new ByteArrayOutputStream();
    Output output = new Output(baos);
    Kryo kryo = new Kryo();
    kryo.setInstantiatorStrategy(new StdInstantiatorStrategy());
    UnmodifiableCollectionsSerializer.registerSerializers(kryo);
    SynchronizedCollectionsSerializer.registerSerializers(kryo);
    kryo.register(Arrays.asList("").getClass(), new ArraysAsListSerializer());
    kryo.register(Query.class);
    kryo.register(Term.class);
    kryo.register(BooleanQuery.class);
    kryo.register(RegexQuery.class);
    kryo.writeClassAndObject(output, (ArrayList<Query>) queryClauses);
    kryo.writeClassAndObject(output, (ArrayList<Term>) termClauses);
    output.close();// w w w  .  j  av  a2 s . c om
    String outputString = Base64.encodeBase64String(baos.toByteArray());
    out.writeObject(outputString);
}

From source file:org.rhq.core.domain.configuration.ObfuscatedPropertySimple.java

private void writeObject(ObjectOutputStream str) throws IOException {
    str.defaultWriteObject();
}

From source file:edu.cuny.jfree.chart.annotations.CategoryIntervalAnnotation.java

private void writeObject(final ObjectOutputStream stream) throws IOException {
    stream.defaultWriteObject();
    SerialUtilities.writePaint(paint, stream);
    SerialUtilities.writeStroke(stroke, stream);
}

From source file:com.doculibre.constellio.lucene.LuceneSearchResultsProvider.java

private void writeObject(ObjectOutputStream out) throws IOException {
    close();
    out.defaultWriteObject();
}

From source file:edu.wisc.my.portlets.bookmarks.domain.Folder.java

private void writeObject(ObjectOutputStream out) throws IOException {
    out.defaultWriteObject();

    if (this.childComparator instanceof Serializable) {
        out.writeObject(this.childComparator);
    } else {/*w w w  . ja  v a 2s .  co  m*/
        out.writeObject(this.childComparator.getClass());
    }
}

From source file:org.alfresco.email.server.impl.subetha.SubethaEmailMessagePart.java

private void writeObject(ObjectOutputStream out) throws IOException {
    contentInputStream = new RemotableInputStream(rmiRegistryHost, rmiRegistryPort, contentInputStream);
    out.defaultWriteObject();
}

From source file:com.swordlord.gozer.eventhandler.generic.GozerEventListenerList.java

private void writeObject(ObjectOutputStream s) throws IOException {
    Object[] lList = listenerList;
    s.defaultWriteObject();

    // Save the non-null event listeners:
    for (int i = 0; i < lList.length; i += 2) {
        Class<?> t = (Class<?>) lList[i];
        GozerEventListener l = (GozerEventListener) lList[i + 1];
        if ((l != null) && (l instanceof Serializable)) {
            s.writeObject(t.getName());/*  ww  w .j  a v  a2s  .c o m*/
            s.writeObject(l);
        }
    }

    s.writeObject(null);
}

From source file:org.apereo.portal.portlet.registry.PortletWindowData.java

private void writeObject(ObjectOutputStream oos) throws IOException {
    oos.defaultWriteObject();
    oos.writeObject(this.portletMode.toString());
    oos.writeObject(this.windowState.toString());
}