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 7408855
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 29, 20262026-05-29T05:59:04+00:00 2026-05-29T05:59:04+00:00

Android: I have two byte arrays one byte array of bitmap and another byte

  • 0

Android:

I have two byte arrays one byte array of bitmap and another byte array of String.
I have combine these two byte arrays into 3rd one.

I will write 3rd byte array into storage.

When i read that image which is created from combine byte array of image and string i want to know in byte[] that where image bytes ends and where string bytes gets start.

How do i know the byte representation of end of image byte ? or starting of string byte ?

Thanks in advance.

  • 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-29T05:59:05+00:00Added an answer on May 29, 2026 at 5:59 am

    Before you write out the byte array, you should write out the length of the image part. That way you’ll know how much data to read. So your file will look like this:

    • Length of image (4 bytes, probably – use DataOutputStream for simplicity)
    • Image data
    • Text data

    (As an aside, I suggest you explicitly write out the text data as UTF-8, and read it as UTF-8. Or you could just use DataOutputStream.writeUTF and DataInputStream.readUTF of course…)

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

Sidebar

Related Questions

I have two threads in an Android application, one is the view thread, and
I will have two android tablets working in the same retail location, both connected
I have two Android projects in Eclipse. I copied the one project from the
Ok, I have two Android projects both running the same API level. In one,
I have two applications, one for android and one for blackberry and I want
I have two buttons defined in XML <Button android:layout_alignParentBottom=true android:id=@+id/takepic_button android:layout_width=wrap_content android:layout_height=wrap_content android:text=@string/Take_Pic android:layout_gravity=left
I am developing an android application in I have two GeoPoints in Google map.One
I have two activities, both of which use a listview. I called one android:list,
In my Android app, I have a Bitmap object and an int[]. One algorithm
This question is related to this one . I have two Android projects inside

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.