add ability to parse from a file object

Change-Id: I4f62fad4d2c0e361eddaed6d4db2faa655bd4b11