Class SerializableObjectInputStream

java.lang.Object
java.io.InputStream
java.io.ObjectInputStream
org.refcodes.io.SerializableObjectInputStream
All Implemented Interfaces:
Closeable, DataInput, ObjectInput, ObjectStreamConstants, AutoCloseable

public class SerializableObjectInputStream extends ObjectInputStream
The SerializableObjectInputStream extends an ordinary ObjectInputStream to also resolve primitive types. In former JDKs (not tested with current ones), primitive types caused problems when deserializing. This class addresses and patches this issue.

Interesting enough that there were already virtual class definitions for the primitive types ("boolean.class" - Boolean.TYPE, "byte.class" - Byte.TYPE, "char.clas" - Character.TYPE, "int.class" - Integer.TYPE, "double.class" - Double.TYPE, "long.class" - Long.TYPE, float.class" - Float.TYPE).