Convert List Of Objects To Inputstream Java