Code example for InvalidObjectException

			throw new NullPointerException("cls");
		Object obj = deserialize(in, cls);
		if (!cls.isInstance(obj))
			throw new InvalidObjectException("type of deserialized instance not of required class.");
		return obj;
	 * Deserializes an object from the given <code>InputStream</code>. 
	 * The deserialization is delegated to an <code> 
	 * ObjectInputStream</code> instance.  
	 * @param in	The <code>InputStream</code> to deserialize an object 
	 *				from. 
	 * @return The object deserialized from the stream.  
Experience pair programming with AI  Get Codota for Java