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.saiku.service.olap.OlapQueryService.java

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

    stream.defaultReadObject();
    queries = new HashMap<>();
    for (Map.Entry<String, String> entry : serializableQueries.entrySet()) {
        createNewOlapQuery(entry.getKey(), entry.getValue());
    }//from   w  w  w  .  j  av  a2s.  c o m
    serializableQueries = null;
}

From source file:com.projity.pm.resource.EnterpriseResource.java

private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
    s.defaultReadObject();
    hasKey = HasKeyImpl.deserialize(s, this);
    costRateTables = CostRateTables.deserialize(s);
    try {/*from w  ww  .  ja  v a  2  s .  com*/
        customFields = CustomFieldsImpl.deserialize(s);
    } catch (java.io.OptionalDataException e) {
        // to ensure compatibilty with old files
        customFields = new CustomFieldsImpl();
    }
    hasAssignments = new HasAssignmentsImpl();
    if (version >= 2) {
        hasAssignments.setSchedulingType(s.readInt());
        hasAssignments.setEffortDriven(s.readBoolean());
        availabilityTable = AvailabilityTable.deserialize(s);
    } else
        availabilityTable = new AvailabilityTable(null);
    version = DEFAULT_VERSION;
}

From source file:net.sf.maltcms.chromaui.charts.FastHeatMapPlot.java

/**
 * Provides serialization support.//from  w ww . j  a v  a  2 s .  c o  m
 *
 * @param stream the input stream.
 *
 * @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.paint = SerialUtilities.readPaint(stream);
    this.domainGridlineStroke = SerialUtilities.readStroke(stream);
    this.domainGridlinePaint = SerialUtilities.readPaint(stream);

    this.rangeGridlineStroke = SerialUtilities.readStroke(stream);
    this.rangeGridlinePaint = SerialUtilities.readPaint(stream);

    if (this.domainAxis != null) {
        this.domainAxis.addChangeListener(this);
    }

    if (this.rangeAxis != null) {
        this.rangeAxis.addChangeListener(this);
    }

    this.dataImage = ImageIO.read(stream);
}

From source file:com.sworddance.util.perf.LapTimer.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    boolean restart = in.readBoolean();
    in.defaultReadObject();
    this.hopCount++;
    if (restart) {
        this.cont();
        //TODO do we continue?
        this.endLap(); //("EndXMIT");
    }//w  w  w.  ja v a  2s . co  m
}

From source file:com.meidusa.amoeba.net.poolable.copy.CursorableLinkedList.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    _size = 0;//from  ww w .j  ava  2 s . co m
    _modCount = 0;
    _cursors = new ArrayList();
    _head = new Listable(null, null, null);
    int size = in.readInt();
    for (int i = 0; i < size; i++) {
        this.add(in.readObject());
    }
}

From source file:er.directtoweb.pages.ERD2WPage.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    d2wContext().takeValueForKey(in.readObject(), Keys.tabKey);
    d2wContext().takeValueForKey(in.readObject(), Keys.tabCount);
    d2wContext().takeValueForKey(in.readObject(), Keys.tabIndex);
}

From source file:com.cyberway.issue.crawler.fetcher.FetchHTTP.java

private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    Cookie cookies[] = (Cookie[]) stream.readObject();
    ObjectPlusFilesInputStream coistream = (ObjectPlusFilesInputStream) stream;
    coistream.registerFinishTask(new PostRestore(cookies));
}

From source file:edu.umd.cs.marmoset.modelClasses.Project.java

private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    int thisMinorVersion = stream.readInt();
    if (thisMinorVersion != serialMinorVersion)
        throw new IOException("Illegal minor version " + thisMinorVersion + ", expecting minor version "
                + serialMinorVersion);/*from  w w  w .j a  va  2s . c  om*/
    stream.defaultReadObject();
}

From source file:genlab.gui.jfreechart.EnhancedSpiderWebPlot.java

/**
 * Provides serialization support.//from w  w w . j  a v  a2s.c o  m
 *
 * @param stream  the input stream.
 *
 * @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.legendItemShape = SerialUtilities.readShape(stream);
    this.seriesPaint = SerialUtilities.readPaint(stream);
    this.baseSeriesPaint = SerialUtilities.readPaint(stream);
    this.seriesOutlinePaint = SerialUtilities.readPaint(stream);
    this.baseSeriesOutlinePaint = SerialUtilities.readPaint(stream);
    this.seriesOutlineStroke = SerialUtilities.readStroke(stream);
    this.baseSeriesOutlineStroke = SerialUtilities.readStroke(stream);
    this.labelPaint = SerialUtilities.readPaint(stream);
    this.axisLinePaint = SerialUtilities.readPaint(stream);
    this.axisLineStroke = SerialUtilities.readStroke(stream);
    if (this.dataset != null) {
        this.dataset.addChangeListener(this);
    }
}

From source file:net.sf.jasperreports.crosstabs.design.JRDesignCrosstab.java

@SuppressWarnings("deprecation")
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();

    if (PSEUDO_SERIAL_VERSION_UID < JRConstants.PSEUDO_SERIAL_VERSION_UID_3_7_2) {
        runDirectionValue = RunDirectionEnum.getByValue(runDirection);
    }/*from w w  w .  ja  v  a 2s.  com*/

    if (lineBox == null) {
        lineBox = new JRBaseLineBox(this);
    }

    // this will work as long as SequencedHashMap is part of commons collections
    // we could also look at PSEUDO_SERIAL_VERSION_UID
    if (variablesList.getClass().getName().equals("org.apache.commons.collections.SequencedHashMap")) {
        // converting to the new type
        variablesList = new LinkedMap<String, JRVariable>(variablesList);
    }
}