HI Alex, thanks that's definitely sounds like the way to go. I'll try in somedays since I need to do other things first and see If I get that part finaly working
thanks for your support! :) Carlos 2018-06-01 18:28 GMT+02:00 Alex Harui <aha...@adobe.com.invalid>: > > > On 6/1/18, 3:43 AM, "carlos.rov...@gmail.com on behalf of Carlos Rovira" > <carlos.rov...@gmail.com on behalf of carlosrov...@apache.org> wrote: > > > > > Now to your main question. Are you sure that code 168 is an AMF type > > code? I could certainly be wrong, but it occurred to me that the 168 > > could just be the first byte in serialized data of the message and > that the > > AMF decoding should instantiate the object based on the class alias > then > > see if it implements IExternalizable and call readExternal without > > bothering to examine that byte in the stream. > > > > ok, so if I understand right I must pass the rest of data in > AMFBinaryData > to "readExternal" method? If so, readExternal expects an > IDataInput....and > is not clear to me how as well give that part of the data Array (maybe > I > should create a temporal data array that holds data from current > position > to the end of the array? > Sorry but as you is not my area of expertise. > > I'm just guessing, but if AMFBinaryData implements IDataInput, then I > would pass the AMFBinaryData to readExternal. The readExternal calls > should grab the next set of bytes out of the AMFBinaryData and use it to > deserialize and when it returns, the AMFBinaryData should be set so the > next bytes will be used to generate the next object, if any. In theory > the readExternal of an IExternalizable should not play with the current > position of the input IDataInput other than pulling bytes from the > IDataInput. At least, that's worth a try, IMO. > > HTH, > -Alex > > -- Carlos Rovira http://about.me/carlosrovira