Android Intent serialization and deserialization, androidintent
// Serialize intent. toURI (); // use Intent. parseUri (uriString, 0) for deserialization );
Serialization
Intent intent = new Intent (ACTION); intent. addFlags (Intent. FLAG_ACTIVITY_NEW_TASK); String intnetUri = intent. toURI (0 );
Deserialization
Intent I; try {I = Intent. parseUri (uriString, 0); context. startActivity (I);} catch (URISyntaxException e) {e. printStackTrace ();}
UriString is the serialized Intent.
C # serialization and deserialization: urgent and urgent Use Cases
Serialization and deserialization are used to save data in the memory. They are not a unique technology in C #. For example, the sleep of win7 is the application of this technology,
The C # program can be used to save the object and the current state of the object. It will be obtained through deserialization next time it is opened,
It is generally used for server startup (deserialization) and Shutdown (serialization) to save data.
Serialization and deserialization are used separately
It is mainly used to store objects in another common format, such as binary, xml, and json. Converting objects into this format is called serialization, deserialization is usually returned from this format.
Serialization is mainly required for cross-platform and Object Storage, because only strings or binary formats are allowed on the network, and files must use binary stream formats, to store an object in memory, you must use serialization to convert the object to xml (string), json (string), or binary (Stream)