Reputation: 55200
The coding language is Java.
I have a ByteArray embedded in ActionScriptObject.(http://smartfoxserver.com/'>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 http://www.javafaq.nu/java-article236.html'>this method
It failed with the
java.io.NotSerializable Exception
Regards,
naveenj
Upvotes: 1
Views: 467
Reputation: 595
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
Upvotes: 2
Reputation: 7305
Have you tried with JBoss Serialization? http://www.jboss.org/serialization
Regards.
Upvotes: 0