You need to look at the serialization concept.