Search code examples
apache-flexactionscript-3flex3flex4blazeds

Convert byte to Domain objects


A Java developer just asked me the following:

If I send you byte[] for all the method calls on Remote Objects - will you be able to convert it to domain objects?

Can this be done? And how?

Thanks for any helpful tips!


Solution

  • Yes, you can. It won't happen automatically (ie, like it would if IExternalizable was implemented on both ends), but there's no reason you can't have, for example, a fromBytes static method on your domain objects which accept a ByteArray and construct the object from that.