I would just make a simple strategy impl that switched on the type:
Each one has an impl using read(bytes:ByteArray, data:IGraphicsData)
/write(bytes:ByteArray, data:IGraphicsData)
and then in those classes just write to a byte array all the properties you want.
This way at the end of iterating all the IGraphicsData
instances, you have a binary stream of their instance headers and properties.
.. one way 🙂