|
|||
|
Hello,
I would like to know, how to write a ByteArray class contents using FileStream wrapper class to a file. In SWFKit help, I see that FFish script FileStream can write StringStream byte array to file. I would like to know if it's possible to write bytes from actionscript. Here: Code:
var myArray:ByteArray = new ByteArray(); // let's say this array is filled with bytes var fs:FileStream = new FileStream(path, "w"); fs.write(myArray); // how to pass ByteArray here? fs.flush(); fs.close(); |
|
|||
|
The ByteArray is a very special object, so far there is no good way to save a bytearray. You can only first convert it to a string array, for example, convert each byte to its ascii code, and then save the string into your file, or send it to ffishscript to convert it back to bytes and save them.
|
![]() |
Was this information helpful? Yes No
| Thread Tools | |
| Display Modes | |
|
|