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

  • Home
  • SEARCH
  • 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 6529829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T09:40:57+00:00 2026-05-25T09:40:57+00:00

I am reading a file into byte array, i have inserted some control command

  • 0

I am reading a file into byte array, i have inserted some control command into it, which I need to decode in some other class. But how to identify and separate these information from rest of the content of file being read. I need to use some unique character as a delimiter to identify the start and end of this control command in the byte array. Is there any unique character which i can use for this purpose ? That particular character should not be present in any normal binary file of any format.

  • 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-05-25T09:40:58+00:00Added an answer on May 25, 2026 at 9:40 am

    No, by definition there is no such a control character. But what you can do is store the array in a format that follows: [length of byte array] [byte array]. All you have to do then is read in an integer <- the length, create a new array of that length and read it fully.


    EDIT:

    Okay so use the following format:

    The file name is null terminated so you know the delimiter there (this works because a file name is ASCII only!). Then you have the length (an integer/long) and then the byte array.

    All of the other methods mentioned above are unsafe and if you use a complex delimiter then: it’s not perfect and takes up more space then using the a simple length variable…

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

Sidebar

Related Questions

I'm reading a .wav file into a byte array with the following code. AudioInputStream
Ok, I am reading in dat files into a byte array. For some reason,
I have a binary file which I am reading to a collection of byte
I have a large file(60mb) and I am reading the file into a string
I am reading a binary file into a parsing program. I will need to
I am reading an XML file into a DataSet and need to get the
I am reading in a file into an array. It is reading each char,
I'm having some trouble reading data from a file into a vector of Orders.
I am reading the contents of the file using fread into an char array.
i am trying to read jpg file and convert into byte array this is

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.