PDA

View Full Version : the new ByteArray class?


bombsledder
01-12-2006, 10:58 PM
can someone explain in more detail the advantages/disadvantages of the ByteArray class

http://livedocs.macromedia.com/labs/1/flex/langref/index.html


if anybody knows

thanks everybody

haridsv
01-13-2006, 06:09 AM
As the documentation on flash.util.ByteArray explains, it is for code that deals especially with data in bytes (8 bit), for providing good performance. Regular Array can hold any object, and is designed to be very flexible with size, so it will have a lot of overhead which can be avoided with this. It also provides methods to deal with byte streams that are the result serialized data.

bombsledder
01-13-2006, 08:33 PM
hmm thanks for that

but will it be able to recieve bytes from other programs? e.g sending a byte from a c++ application to flash? because that would make be pretty cool

hangalot
01-13-2006, 09:03 PM
hmm thanks for that

but will it be able to recieve bytes from other programs? e.g sending a byte from a c++ application to flash? because that would make be pretty cool
yes. look at this for an example:
http://www.darronschall.com/weblog/archives/000192.cfm

bombsledder
01-13-2006, 10:41 PM
thanks for this im not at my main cpu right now but when i can im sure to download the swf.. sooo what exactly does the swf do? the picture shows notepad so havent really seen a pic but as3 is gonna be right cool :D


wate is it recieving the bytes from the computer and writing it on the net o.O wow thats pretty cool or is it just a static image of his desktop?


AS3 is gonna be like the best just in its gonna be more functional* which i like, its becoming more and more like real* programming languages with its new functionality coming out... i wonder when the will release AS3 for flash?

hangalot
01-15-2006, 01:23 PM
as3 kicks serious @ss

hangalot
03-01-2006, 07:14 AM
here is a class i wrote to store uints in a bytearray
http://www.lennel.org/xperiments/typed-array/srcview/org/lennel/utils/UIntByteArray.as.html
it was quite fast. a normal array is still the best.
then the bytearray format is also the amf3 format so that what gets sent over via remoting.
each class also has its own serializer and deserializer to byte array built in. look at this example here
http://www.peterjoel.com/blog/?&showComments=114064012876401732#114064012876401732