How to write a list of strings to a file and then retrieve the list?Basically how do I write a small custom serializer and deserializer for this custom job.
Asked
Active
Viewed 54 times
-1
-
I tried to implement something on the lines of a md5 hash, but it doesn't look efficient. – codeKashmir Mar 15 '15 at 06:24
-
This question is too broad. Try narrowing it down by giving more details in the question rather than adding comments. – Chetan Kinger Mar 15 '15 at 06:30
1 Answers
1
Seems that is a case that serialization will do the work, as you pointed is trivial to select a separator that is not used on the string. md5 clearly you cannot use it,becouse is a one way encripting, so you will not be able to obtain the list laster. The other option if you don´t want to use serialization, is to convert each string in base64, and then keep a empty line as separator per example.
About serialization:

Community
- 1
- 1

Ricardo Umpierrez
- 768
- 2
- 11
- 24