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:com.autonomy.aci.client.services.impl.AbstractStAXProcessor.java

private void readObject(final ObjectInputStream inputStream) throws IOException, ClassNotFoundException {
    // Read in all the serialized properties...
    inputStream.defaultReadObject();

    // Recreate the XMLStreamReader factory...
    xmlInputFactory = XMLInputFactory.newInstance();
}

From source file:com.elsevier.spark_xml_utils.xquery.XQueryProcessor.java

/**
 * Restore the serialized object and then do a one time initialization to improve
 * performance for repetitive invocations of evaluate expressions.  We need to
 * initialize the transient variables.//from w  ww .  j a  va 2s .co  m
 * 
 * @param inputStream
 * @throws IOException
 * @throws ClassNotFoundException
 * @throws XQueryException 
 */
private void readObject(ObjectInputStream inputStream)
        throws IOException, ClassNotFoundException, XQueryException {

    inputStream.defaultReadObject();
    init();

}

From source file:com.gargoylesoftware.htmlunit.DefaultCredentialsProvider.java

/**
 * Clears the cache of answered credentials requests upon deserialization.
 * @param stream the object stream containing the instance being deserialized
 * @throws IOException if an IO error occurs
 * @throws ClassNotFoundException if the class of a serialized object cannot be found
 *//*from w ww.j a  v  a  2  s  . c o  m*/
private void readObject(final ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    answerMarks_.clear();
}

From source file:ddf.catalog.data.AttributeImpl.java

/**
 * Deserializes this {@link AttributeImpl}'s instance.
 * /*  www .  jav  a 2 s . c o m*/
 * @param stream
 *            the {@link ObjectInputStream} that contains the bytes of the
 *            object
 * @throws IOException
 * @throws ClassNotFoundException
 */
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {

    /*
     * defaultReadObject() is invoked for greater flexibility and
     * compatibility. See the *Serialization Note* in MetacardImpl's class
     * Javadoc.
     */
    s.defaultReadObject();

    int numElements = s.readInt();

    validateNonEmpty(numElements);

    values = new LinkedList<Serializable>();
    for (int i = 0; i < numElements; i++) {
        values.add((Serializable) s.readObject());
    }

    validateUntampered(numElements);

}

From source file:org.limewire.mojito.routing.impl.LocalContact.java

private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    in.defaultReadObject();
    init();//from w w w . j  ava 2s.c o m
}

From source file:org.seasar.mayaa.impl.engine.specification.SpecificationNodeImpl.java

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    in.defaultReadObject();
    if (_delegateNodeTreeWalker != null) {
        _delegateNodeTreeWalker.setOwner(this);
    }/*  w  w  w .j  av a2s  .  c  o m*/
    // namespace
    String currentMappingInfo = in.readUTF();
    NamespaceImpl namespace = deserialize(currentMappingInfo);
    setDefaultNamespaceMapping(namespace.getDefaultNamespaceMapping());
    for (Iterator it = namespace.iteratePrefixMapping(false); it.hasNext();) {
        PrefixMapping mapping = (PrefixMapping) it.next();
        addPrefixMapping(mapping.getPrefix(), mapping.getNamespaceURI());
    }
    // parent namespace
    Object nscheck = in.readObject();
    if (nscheck instanceof NamespaceImpl) {
        setParentSpace((Namespace) nscheck);
    }
    findNodeResolver().nodeLoaded(this);
}

From source file:cn.clxy.studio.common.web.multipart.GFileItem.java

/**
 * Reads the state of this object during deserialization.
 *
 * @param in The stream from which the state should be read.
 *
 * @throws IOException if an error occurs.
 * @throws ClassNotFoundException if class cannot be found.
 *///  ww w  .ja  va2 s  . c  o m
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException {
    // read values
    in.defaultReadObject();

    OutputStream output = getOutputStream();
    if (cachedContent != null) {
        output.write(cachedContent);
    }
    output.close();

    cachedContent = null;
}

From source file:net.lightbody.bmp.proxy.jetty.util.Pool.java

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    in.defaultReadObject();
    if (_class == null || !_class.getName().equals(_className)) {
        try {/*from w  w  w  .jav  a2s  .  com*/
            setPoolClass(Loader.loadClass(Pool.class, _className));
        } catch (Exception e) {
            log.warn(LogSupport.EXCEPTION, e);
            throw new java.io.InvalidObjectException(e.toString());
        }
    }
}

From source file:gov.nih.nci.caintegrator.application.geneexpression.BoxAndWhiskerCoinPlotRenderer.java

private void readObject(ObjectInputStream stream) throws IOException, ClassNotFoundException {
    stream.defaultReadObject();
    setArtifactPaint(SerialUtilities.readPaint(stream));
}

From source file:com.npower.dm.security.SecurityOfficer.java

private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
    in.defaultReadObject();
    log = LogFactory.getLog(SecurityOfficer.class);
}