johnny94
johnny94

Reputation: 321

Merging different files in Java

I have data files (e.g. text, image, …) and a digital signature of these files. I need to merge them into one file and send this file over a network. Is it possible to merge two or more different files into one, so I can later split that one file into several files, as it was before the merge? This split and merge would have to be done using my program written in Java.

Upvotes: 0

Views: 110

Answers (1)

larsgrefer
larsgrefer

Reputation: 2853

You could create a tar file or a zip file:

Creating tar-files in java: https://github.com/kamranzafar/jtar

Creating zip-files in java: https://www.mkyong.com/java/how-to-compress-files-in-zip-format/

Upvotes: 2

Related Questions