You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by PKumar <pr...@gmail.com> on 2016/10/29 09:13:23 UTC

FlexJS: ByteArray Implementation

Hi,

is ByteArray available in FlexJS as compare to Flash ByteArray? 



-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-ByteArray-Implementation-tp13973.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: FlexJS: ByteArray Implementation

Posted by Harbs <ha...@gmail.com>.
There’s BinaryData which implements most of ByteArray, but not all.

(pretty much readObject and writeObject is all that’s missing)

On Oct 29, 2016, at 12:13 PM, PKumar <pr...@gmail.com> wrote:

> Hi,
> 
> is ByteArray available in FlexJS as compare to Flash ByteArray? 
> 
> 
> 
> -----
> Regards,
> Prashant
> --
> View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-ByteArray-Implementation-tp13973.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: FlexJS: ByteArray Implementation

Posted by Alex Harui <ah...@adobe.com>.

On 10/30/16, 7:26 AM, "Harbs" <ha...@gmail.com> wrote:

>FWIW, I don’t think it makes sense to implement
>readObject,writeObject,inflate and deflate in the core class the way
>Flash ByteArray has it. It will require a lot of code as dependencies. It
>probably makes more sense to have utility classes for this functionality
>to make it “pay as you go”.

Good point about the dependencies.  It occurs to me that PAYG might be
better implemented as subclasses of a ByteArray/BinaryData that doesn't
support the objects and compression.  Or else you will have to cheat
because I would guess that the implementation shouldn't have to call
writeByte/readByte and should just have access to the underlying bytes.

So, a org.apache.flex.utils.ByteArray may only support simple types, and a
org.apache.flex.utils.AMFByteArray could support AMF encode/decode via
readObject/writeObject.

-Alex


Re: FlexJS: ByteArray Implementation

Posted by Harbs <ha...@gmail.com>.
FWIW, I don’t think it makes sense to implement readObject,writeObject,inflate and deflate in the core class the way Flash ByteArray has it. It will require a lot of code as dependencies. It probably makes more sense to have utility classes for this functionality to make it “pay as you go”.

Harbs

On Oct 30, 2016, at 4:08 PM, Alex Harui <ah...@adobe.com> wrote:

> 
> 
> On 10/29/16, 11:55 PM, "PKumar" <pr...@gmail.com> wrote:
> 
>> i was exploring byteArray for AMF serialization/deserialization. So  I
>> will
>> have to depend on java script library only.
> 
> In theory, amfjs has the code in it that would be used for
> ByteArray/BinaryData readObject/writeObject.
> 
> -Alex
> 


Re: FlexJS: ByteArray Implementation

Posted by Alex Harui <ah...@adobe.com>.

On 10/29/16, 11:55 PM, "PKumar" <pr...@gmail.com> wrote:

>i was exploring byteArray for AMF serialization/deserialization. So  I
>will
>have to depend on java script library only.

In theory, amfjs has the code in it that would be used for
ByteArray/BinaryData readObject/writeObject.

-Alex


Re: FlexJS: ByteArray Implementation

Posted by PKumar <pr...@gmail.com>.
i was exploring byteArray for AMF serialization/deserialization. So  I will
have to depend on java script library only.



-----
Regards,
Prashant
--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/FlexJS-ByteArray-Implementation-tp13973p13977.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: FlexJS: ByteArray Implementation

Posted by Alex Harui <ah...@adobe.com>.

On 10/29/16, 2:13 AM, "PKumar" <pr...@gmail.com> wrote:

>Hi,
>
>is ByteArray available in FlexJS as compare to Flash ByteArray?
>

Not yet.  We are waiting for a volunteer to write the AMF-like
serialization/deserialization so we can implement writeObject/readObject.

Thanks,
-Alex