Click here to Skip to main content
15,896,727 members
Articles / Programming Languages / Java / Java SE

OpenNxSerialization

Rate me:
Please Sign up or sign in to vote.
5.00/5 (1 vote)
16 Jun 2009GPL32 min read 20.4K   177   9  
Speed up object serialization in Java.
/*
 * @(#)NxObjectInput.java	1.0
 *
 * Created on September 18, 2008, 12:59 PM
 *
 * Copyright 2008 NeXtreme Innovations, Inc. All rights reserved.
 * "NeXtreme Innovations" PROPRIETARY/CONFIDENTIAL. Use is subject
 * to license terms.
 */

package com.nextreme.opennxserialization.core.io;

import java.io.ObjectInput;
import java.io.IOException;
import java.io.InputStream;

/**
 * NxObjectInput extends the ObjectInput interface to include the reading of
 * objects as instances of different types. 
 *
 * @version 1.0, September 18, 2008
 */
public interface NxObjectInput extends ObjectInput 
{
    /**
     * Returns the current <see cref="NxSerializationContext"/> object.
     *
     * @return the current serialzation context
     */
    public NxSerializationContext getContext();

    /**
     * Returns the underlying InputStream object. 
     */
    public InputStream getBaseStream();
    
    /**
     * Read and return an object. The class that implements this interface
     * defines where the object is "read" from.
     *
     * @param objClass the class surrogate to use for reading the object.
     * @return the object read from the stream
     * @exception java.lang.ClassNotFoundException If the class of a serialized
     *      object cannot be found.
     * @exception IOException If any of the usual Input/Output
     * related exceptions occur.
     */
    public Object readObjectAs(Class objClass)
	throws ClassNotFoundException, IOException;
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Architect
Pakistan Pakistan
Let a = b ....... (1)
a - b = a - b
a^2 - ab = a^2 - ab
a^2 - ab = a^2 - b^2 (from 1)
a (a - b) = (a + b) (a - b)
a = (a + b) ...... (2)

if a = 1
1 = (1 + 1) (from 1 & 2)
1 = 2 !!

Comments and Discussions