royale-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alex Harui <aha...@adobe.com.INVALID>
Subject Re: Need some help with Small Messages
Date Fri, 01 Jun 2018 16:28:59 GMT


´╗┐On 6/1/18, 3:43 AM, "carlos.rovira@gmail.com on behalf of Carlos Rovira" <carlos.rovira@gmail.com
on behalf of carlosrovira@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

Mime
View raw message