Often one uses serialization to accomplish these kind of things (configurations and settings). In fact I'm planning to do a similar thing to load messages, states etc; used in a protocol I'm meant to implement.
Often one uses xml serialization but in this case binary might be equally if not...