I read a file’s content into a byte array using the following code:
public var bytes:ByteArray = new ByteArray();
var primaryfile:File = File.applicationStorageDirectory.resolvePath("data/updates/assets/"+this.assetvideoid+"/"+this.assetdetails[0]['filename']);
var tempfile:File = File.applicationStorageDirectory.resolvePath("data/updates/assets/"+this.assetvideoid+"/"+this.assetdetails[0]['filename']+"-temp");
filestream = new FileStream();
filestream.open(primaryfile, FileMode.READ);
filestream.readBytes(bytes, 0, bytes.length);
filestream.close();
Is it possible to remove some initial bytes from a bytearray say 30 bytes from the beginning?
🙂