Example usage for java.io ObjectInputStream defaultReadObject

List of usage examples for java.io ObjectInputStream defaultReadObject

Introduction

In this page you can find the example usage for java.io ObjectInputStream defaultReadObject.

Prototype

public void defaultReadObject() throws IOException, ClassNotFoundException 

Source Link

Document

Read the non-static and non-transient fields of the current class from this stream.

Usage

From source file:org.kuali.rice.kew.routeheader.StandardDocumentContent.java

private void readObject(ObjectInputStream ais) throws IOException, ClassNotFoundException {
    ais.defaultReadObject();
    initialize(this.docContent, this.routeContext);
}

From source file:org.mitre.openid.connect.model.OIDCAuthenticationToken.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException, ParseException {
    in.defaultReadObject();
    Object o = in.readObject();//from  www.  j a v a  2 s  .co  m
    if (o != null) {
        idToken = JWTParser.parse((String) o);
    }
}

From source file:com.uofa.adventure_app.model.Choice.java

/**
 * Always treat de-serialization as a full-blown constructor, by validating
 * the final state of the de-serialized object.
 *//*  w w  w. j a va  2s.  c  om*/
private void readObject(ObjectInputStream aInputStream) throws ClassNotFoundException, IOException {
    // always perform the default de-serialization first
    aInputStream.defaultReadObject();

}

From source file:com.github.gfernandez598.swf.conversation.optforrepl.ContainedConversation.java

/**
 * Read the input stream/*from  w  ww.j a v a  2s .  c o m*/
 * 
 * @param in
 *            the input stream
 * @throws IOException
 * @throws ClassNotFoundException
 */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    lock = ConversationLockFactory.createLock(container.getLockTimeoutSeconds());
}

From source file:com.abelsky.idea.geekandpoke.entries.Entry.java

private void readObject(@NotNull ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    imageRef = new SoftReference<BufferedImage>(ImageIO.read(ImageIO.createImageInputStream(in)));
}

From source file:it.unibo.alchemist.model.implementations.linkingrules.ConnectionBeam.java

private void readObject(final ObjectInputStream o) throws ClassNotFoundException, IOException {
    o.defaultReadObject();
    oenv = null;/*from   w ww.  jav a2  s.c  om*/
    obstacles = new Area();
}

From source file:org.jactr.tools.async.message.ast.BaseASTMessage.java

private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    boolean astIsNotNull = in.readBoolean();
    if (astIsNotNull) {
        boolean wasCompressed = in.readBoolean();

        if (wasCompressed) {
            /*//from  w  w w.  j a  v  a2s.co m
             * pull through GZIPInputStream. this can be done more effeciently..
             */
            int len = in.readInt();

            byte[] bytes = _localInput.get();
            if (bytes == null || bytes.length < len) {
                bytes = new byte[len];
                _localInput.set(bytes);
            }

            if (LOGGER.isDebugEnabled())
                LOGGER.debug("Reading " + len + " bytes to decompress");

            in.read(bytes, 0, len);

            // in.readFully(bytes);

            ByteArrayInputStream bais = new ByteArrayInputStream(bytes, 0, len);
            DataInputStream zip = new DataInputStream(new GZIPInputStream(bais));
            _ast = Serializer.read(zip);
        } else
            _ast = Serializer.read(in);
    }
}

From source file:org.mapsforge.core.GeoPoint.java

private void readObject(ObjectInputStream objectInputStream) throws IOException, ClassNotFoundException {
    objectInputStream.defaultReadObject();
    this.hashCodeValue = calculateHashCode();
}

From source file:org.mule.message.ExceptionMessage.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    try {//from   w ww .j a va  2  s . c  om
        exception = (Throwable) in.readObject();
    } catch (Exception e) {
        // ignore
    }
    try {
        payload = in.readObject();
    } catch (Exception e) {
        // ignore
    }
}

From source file:org.kuali.rice.core.api.mo.AbstractDataTransferObject.java

private void readObject(ObjectInputStream ois) throws IOException, ClassNotFoundException {
    ois.defaultReadObject();
    serializationMutex = new Object();
}