It is Working Fine for me using byte[] my java code: ----------------------------- public byte[] sayHello() { System.out.println(" Say Hello "); try { File file=new File ("D:/image014.gif"); FileInputStream fin = new FileInputStream(file); byte fileContent[] = new byte[(int)file.length()]; fin.read(fileContent); return fileContent;
} catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } return null; } my flex code: ------------------ [Bindable] var img:ByteArray=null; private function resultHandler(event:ResultEvent):void { trace("Result "+event.result); img= event.result as ByteArray; } On May 12, 12:00 am, imtiyaz <imtiyaz...@gmail.com> wrote: > are u guys using java.lang.Byte[] or primitive data type byte []. > Flex only supports byte []. > > Regards, > Imtiyaz Basha M S > > On May 11, 12:54 pm, Xuefeng Wu <ben...@gmail.com> wrote: > > > Hi Sachin, > > > I meet the same problem. Do you resolve it now? > > > On Apr 11, 7:29 am, Sachin Patil <write2s...@gmail.com> wrote: > > > > Hi, > > > > I just went through the new enhancements for FileReferance class in > > > flash player 10. With load() function we can load the ByteArray to > > > Flex application. > > > > I want to use this to develop a File Upload component. I want to save/ > > > get images to/from server(Java) using remote object. > > > > I am able to send the file ByteArray to server. However, when i try to > > > get byte[] from java to flex (using remote object) i get null. (I sent > > > a byteArray and replied the same byteArray back) > > > > i am getting exception below: > > > TypeError: Error #1034: Type Coercion failed: cannot convert to > > > flash.utils.ByteArray > > > > I am not sure if i can achieve this, should i use upload, download? or > > > i can use load/save and data communication through remoteObject? > > > > Need your help on this. > > > > Regards, > > > Sachin Patil. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to flex_india@googlegroups.com To unsubscribe from this group, send email to flex_india+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---