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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:54:52+00:00 2026-06-11T01:54:52+00:00

I have to work on a project in which I have to convert a

  • 0

I have to work on a project in which I have to convert a binary file into a custom file format, which requires splitting the file adding some data to it and then repacking it into the new file.

For Example

I have a file of 1 MB and I have to split it into chunks of fixed length and then adding some data as a header to it.
After that the entire file will be repackaged into a new file.

Please any help will be appreciated.

  • 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-11T01:54:53+00:00Added an answer on June 11, 2026 at 1:54 am

    First you use a DataInputStream to read chunks of x bytes into individual byte arrays, where x is your chunk size. I would suggest to store these byte arrays in an ArrayList.

    Then you create a DataOutputStream for creating the new file.

    Finally, you iterate over your ArrayList with a for loop and write the contents of the arrays to the DataOutputStream, preceded or followed by the additional data you need to add for each chunk.

    I hope I was able to help you. When something is unclear, feel free to ask.

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

Sidebar

Related Questions

i have part of Asp.NET 1.1 project. I work with remote site, which works
I need some help with a work project I have been assigned. At the
Some of the developers on the project I work on have a habit of
I want to add banner to my project. I have done some work in
I work with my student group on a project : We have some problems
All, I have a VB6 project with about 100 custom collection classes which I
I was just told that I might have to work on a project where
I have started to work on maven project recently. The piece of code I
I have a large c# project at work that controls a radar jammer. When
I have a project being ported to work on Linux under Mono. The project

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.