Reads object serialized by java ObjectOutputStream