Also, my ArrayList is automatically converted by the database API into the byte[]
Frankly, you are going to have to find the actual serialization API used to stand a chance of reconstructing this data. It is probably BinaryFormatter
, which is notoriously non-portable and version-intolerant.
If you need to store data as binary, and use it long-term (database) and between platforms (CF), then you are going to have to use a suitable serializer. For example, protobuf-net would work in principal (although it won't like untyped ArrayList
, preferring typed List<T>
etc).
If the data is currently stored as BinaryFormatter
, then your best bet would be to extract it using your current system and re-package it (perhaps in a different column or table) in a more suitable serialization format.