Code example for ObjectInputStream

Methods: readObject

0
	/** 
	 * Reads the input stream and deserializes into an object. 
	 */ 
	@Override 
	public Object deserialize(InputStream inputStream) throws IOException {
		ObjectInputStream objectInputStream = new ObjectInputStream(inputStream);
		try { 
			return objectInputStream.readObject();
		} 
		catch (ClassNotFoundException ex) {
			throw new NestedIOException("Failed to deserialize object type", ex);
		} 
	} 
 
}