Converts a ByteArray into a hex string that is used by ssCore.FileSys.appendToFileBinary and ssCore.FileSys.writeToFileBinary.


First available in version 3.5 build 314.

Available only in ActionScript 3.


dataStr = StringUtils.byteArrayToHexString(dataByteArr)

dataStr - String - The ByteArray data represented as a hex string formatted as two characters per byte.


dataByteArr - ByteArray - A ByteArray that will be converted into a hex string.


Editing binary values cannot be done directly in ActionScript, which is why there is the ByteArray class in ActionScript 3. With a ByteArray you can manipulate data at the byte level. Use this function to convert a ByteArray into data that can be written by ssCore.FileSys.appendToFileBinary and ssCore.FileSys.writeToFileBinary.

See ssCore.FileSys.appendToFileBinary, ssCore.FileSys.readFileBinary, ssCore.FileSys.writeToFileBinary, and StringUtils.hexStringToByteArray.


var dataStr:String = StringUtils.byteArrayToHexString(myByteArray);

var r:Object = ssCore.FileSys.writeToFileBinary({path:"startdir://file.swf", data:dataStr});