Click here to Skip to main content
15,897,291 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hey guys

as you can see on the title of subject.. my question is, how do I merge 2 binary files into one with java? Is there something like a command or do I have to write some code by my own?


Greetings epanjohura
Posted

1 solution

What sort of files are they and how are they to be merged? If you just want to append one to the other then you can use simple file read and write[^]. If you want something more sophisticated then you will need to specify in more detail.
 
Share this answer
 
Comments
epanjohura 24-Feb-12 9:42am    
They're binary files, I want to put both files in only one binary file..
Richard MacCutchan 24-Feb-12 9:52am    
Then, as I said before, Just read each one in turn writing the data to a new output file. The link I provided above will guide you through the basics of the Java code you need.
epanjohura 24-Feb-12 9:54am    
okay, thank you very much for your help.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900