var fData : ByteArray = new ByteArray();플래시 as3 byteArray의 일부를 제거하는 방법은 무엇입니까?
이 배열에서 일부 바이트를 제거해야하지만 플래시에서 공용 메서드를 찾을 수 없습니다. fData.remove (start, length)를 검색했지만 성공하지 못했습니다. 여기
는function _dlProgressHandler(evt:ProgressEvent):void { //this is progressEvent for URLStream
............... ///some code
var ff:ByteArray = new ByteArray();
stream.readBytes(ff,0,stream.bytesAvailable);
fileData.writeBytes(ff,0,ff.length); //stream writes into fileData byteArray
//and here is cutter:
fileData.position=0;
fileData.writeBytes(ff,100,fileData.length);
fileData.length=fileData.length-100);
}
그래서, FILEDATA는 예측할 때로는 자신을 잘라 코드입니다. 가끔 오래된 블록이 두 번 발견되는 경우도 있지만 때로는 발견되지 않을 수도 있습니다.
내가 궁금 단지 검사
그 자체에 쓸 수 있습니까? 은 fData.writeBytes (fData, 2, 7)와 같습니다. ? ByteArray가 매우 큰 경우 해결책이 무엇이 될지 잘 모르겠다. @shaunhusain 좋은 점, –
). –