views:

137

answers:

2

Hi Guys,

The coding language is Java.
I have a ByteArray embedded in ActionScriptObject.(Smartfox Server)
I want to convert it into ByteArray.
The idea is to save it as an image.

This a sequel to the post --> Convert Byte Array from Action Script to Image in Java and save it

Have tried this method
It failed with the

java.io.NotSerializable Exception

Regards,
naveenj

A: 

Have you tried with JBoss Serialization? http://www.jboss.org/serialization

Regards.

mrrtnn
+1  A: 

The NotSerializableException is because the ActionScriptObject does not implement Serializable.

The ActionScriptObject does not support byte arrays. This is according to information found on the SmartFox Server forum. This probably means that when it creates the Java object that represents your ActionScript object, it does not copy the "arr" property at all!

To transfer the image data to the server you will have to use a network socket and write the data down the wire.

Reading the docs for Smartfox Server, there is a SocketLoader tutorial in chapter 8.17 which should allow you to transmit the image data to the server. http://www.smartfoxserver.com/docs/index.htm?http://www.smartfoxserver.com/docs/docPages/tutorials_pro/17_socketFileLoader/index.htm

Chris Mountford
thanks pal... the perfect answer... i figured that by myself.... still you deserve the bounty...
naveen