which is called by java applet.
I am getting an error imgLoader.loadBytes(img) call, since it
can't convert Object to ByteArray.
Can anybody help me to resolve this issue or provide me any
sample code, where I can pass byte  from Java Applet to Flex App
public function setInFlex(img):void
imgLoader = new Loader();
I *did* find a way to get this done, but it is far from
In the java applet, encode the byte into a base64 String
(implementation taken from java source).
Return this string to your Flex app where you run a base64
decoder on it.
I made mine from an old source file of
mx.utils.Base64Decoder.as I cut everything out of this but a static decode method which
returns the ByteArray instead of storing it in the decoder class,
but its still too slow with large amounts of data.
Now you can load it like a normal ByteArray, once the bytes
are done loading of course.
I read that ExternalInterface was
slow with large quantities of data, but my prototype didn't
experience these kind of delays (700ms for 1.7Mb).
ExternalInterface was probably optimized in Flash9.
The problem I'm having is the decode time (2s for that 1.7Mb
jpg)... much too long for what I'm trying to accomplish.
If anyone finds away to transfer a java byte to flex
ByteArray in a timely manner, please let us know.