Add methods to read/write objects from/to file

Change-Id: I53c69bcbea552248acf4c6ca8048239674894f04
Signed-off-by: Denis Knoepfle <denis.knoepfle@sap.com>