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:net.javacoding.queue.DiskQueue.java

private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    // after deserialization, must reinitialize object streams from underlying bytestreams
    isInitialized = false;//from   ww w. java 2 s.  c o m
}

From source file:net.sf.nmedit.jtheme.store2.AbstractMultiParameterElement.java

private void readObject(java.io.ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    int size = in.readInt();

    parameterElementNames = new String[size];
    componentIdList = new String[size];

    size = in.readInt();//  www . j  a va2s . com
    for (int i = 0; i < size; i++) {
        int index = in.readInt();
        String n = (String) in.readObject();
        parameterElementNames[index] = n;
    }

    size = in.readInt();
    for (int i = 0; i < size; i++) {
        int index = in.readInt();
        String n = (String) in.readObject();
        componentIdList[index] = n;
    }

    size = in.readInt();
    if (size > 0) {
        valueList = new Object[size * 2];
        for (int i = 0; i < size; i += 2) {
            String name = (String) in.readObject();
            int value = in.readInt();
            valueList[i] = name;
            valueList[i + 1] = value;
        }
    }

}

From source file:org.mule.api.MessagingException.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    boolean failingMessageProcessorWasSerialized = in.readBoolean();
    if (failingMessageProcessorWasSerialized) {
        this.failingMessageProcessor = (MessageProcessor) in.readObject();
    }//from w  w  w  . jav  a 2  s .  co  m
}

From source file:com.cyberway.issue.crawler.datamodel.CrawlServer.java

/** 
 * Called when object is being deserialized.
 * In addition to the default java deserialization, this method
 * re-establishes the references to settings handler and robots honoring
 * policy.//from  ww  w.jav  a2 s  . com
 *
 * @param stream the stream to deserialize from.
 * @throws IOException if I/O errors occur
 * @throws ClassNotFoundException If the class for an object being restored
 *         cannot be found.
 */
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    settingsHandler = SettingsHandler.getThreadContextSettingsHandler();
    postDeserialize();
}

From source file:com.phoenixst.plexus.operations.Join.java

private void readObject(ObjectInputStream in) throws ClassNotFoundException, IOException {
    in.defaultReadObject();
    if (left == null) {
        throw new InvalidObjectException("Left operand is null.");
    }/*w w w.jav  a2 s  . c  o m*/
    if (right == null) {
        throw new InvalidObjectException("Right operand is null.");
    }
    initialize();
}

From source file:vteaexploration.XYPolygonAnnotation.java

/**
 * Provides serialization support.//from w  w  w.ja  v a2  s. c o m
 *
 * @param stream the input stream (null not permitted).
 *
 * @throws IOException if there is an I/O error.
 * @throws ClassNotFoundException if there is a classpath problem.
 */
private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    this.stroke = SerialUtilities.readStroke(stream);
    this.outlinePaint = SerialUtilities.readPaint(stream);
    this.fillPaint = SerialUtilities.readPaint(stream);
}

From source file:blue.mixer.Effect.java

private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();

    parameterList.setBSBGraphicInterface(graphicInterface);
}

From source file:org.opencastproject.capture.impl.RecordingImpl.java

/**
 * Overrides the default serialization behaviour. This method reads the mediapackage from the mediapackage.xml file in
 * the base directory of this capture/* w w w.ja v  a2s  .  c o  m*/
 * 
 * @param in
 *          The ObjectInputStream for the serialization
 * @throws IOException
 * @throws ClassNotFoundException
 */
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    try {
        mPkg = MediaPackageImpl.valueOf(in);
    } catch (MediaPackageException e) {
        logger.error("Unable to read mediapackage from disk!  Error was: {}.", e);
    }
}

From source file:org.betaconceptframework.astroboa.model.impl.SimpleCmsPropertyImpl.java

private void readObject(ObjectInputStream ois) throws ClassNotFoundException, IOException {

    //Deserialize bean normally
    ois.defaultReadObject();

    //Inject Property definition
    LazyLoader lazyLoader = AstroboaClientContextHolder.getLazyLoaderForClient(authenticationToken);

    if (lazyLoader != null) {
        lazyLoader.activateClientContextForAuthenticationToken(authenticationToken);
        setPropertyDefinition((D) lazyLoader.getDefinitionService().getCmsDefinition(fullPropertyDefinitionPath,
                ResourceRepresentationType.DEFINITION_INSTANCE, false));
    }//from   w  w w .j  av  a2  s.c  o  m
}

From source file:org.mule.MessagePropertiesContext.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    sessionMap = new UndefinedSessionPropertiesMap();
}