Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8343615
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T06:07:16+00:00 2026-06-09T06:07:16+00:00

var fData:ByteArray = new ByteArray(); I need to remove some bytes in this array,

  • 0

var fData:ByteArray = new ByteArray();

I need to remove some bytes in this array, but can’t find any public method in Flash to do that.
I searched something like fData.remove(start,length) but with no success.

here is a code

    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);

}

So, fileData cut itself unpredictably sometimes.
Sometimes old blocks’re found twice, sometimes they’re not found at all.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T06:07:18+00:00Added an answer on June 9, 2026 at 6:07 am

    You can always just only read the bytes that you want, which will have the same effect as discarding the bytes that you don’t want. As a very simple example, assume you have a ByteArray that is 10 bytes long and you want to discard the first 3 bytes:

    var newBytes:ByteArray = new ByteArray();
    newBytes.writeBytes(fData, 2, 7);  
    

    So instead of removing the bytes that you don’t want from fData, you just create a new ByteArray and only get they bytes that you want from fData.

    Obviously, if the sequence of bytes you want to remove is not just a sequence from the beginning or end of fData it will be a little more complicated, but the method remains the same: read the bytes that you want, instead of removing the ones you don’t.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var fruit = [apple,pear,pear,pear,banana]; How do I remove all pear fruit from this array?
var conversations = new Array(); jQuery('.CChatWindow').each(function(){ if (jQuery(this).is(:visible) && jQuery(this).attr(data-conversationid) != 0) { alert(jQuery(this).attr(data-conversationid));
var chart; var d = new Array(); function click() { d = document.getElementById('graph:hi').value; alert(d);
var longitudeArray = new Array(<?php $result = count($longitudeArray); if ($result > 1){ echo implode(',',
var firstValue = $(this).find('.feedback-selected').val(); var secondValue = $('.feedback-selected').val(); alert(firstValue); alert(secondValue); <script src=https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js></script> <div> <input
var ref1 = new Firebase(http://gamma.firebase.com/myuser/123,456); ref1.set(123,456); var on1 = ref1.on(value, function(snapshot) { console.log(snapshot.val()); });
var gethtml = $(#topmenu > li.l89 a).text().split(' ')[1].replaceWith('Any World'); The text is not changing
var hyp = document.createElement(a); //hyp.style.cssText='cursor:pointer'; hyp.onclick=RemoveDv(' + divid + ');; hyp.innerHTML = Remove; I
this is really strange, i have an array in delphi and fill it with
I have searched the web for this but so far got nowhere. I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.