String Stream


Subclass of Serializer that serializes values into a string. It is also used to restore values serialized in a string using the serialization mechanism provided by Serializer. This class is useful to pack values into strings that can be stored in run-time memory or other sort of storage.

Instances of this class implement the write method required by Serializer in such way that it stores the pieces of the serialized code in the instance itself and concatenates them to produce the serialized code.



data [optional]
String containing sequences of serialized values separated by null characters (i.e. "\0"). This string must contain the serialized code of the values to be restored. If this field evaluates to false then the serialized code produced previously by the instance is used to retrieve values.


Serializes the arguments and stores the results in the instance so it is used to form the complete final serialized code in a string. The sequences of values serialized by this function are separated by null characters (i.e. "\0").
Each time this method is called, it restores one of the set of values serialized in the string stored in field data, in the same order they were serialized. All the set of values stored in the string stored in field data must be separated by null characters (i.e. "\0").


Concatenates all the pieces of serialized code to form a string containing all serialized values. If there are more than one sequence of values serialized then such sequences are separated by null characters (i.e. "\0").




-- example missing

Copyright (C) 2004-2008 Tecgraf, PUC-Rio

This project is currently being maintained by Tecgraf at PUC-Rio.