Deserialize method with input stream added