File Split and Merge Utility Tool

1. Introduction

This Java application allows users to split large files into smaller parts and reconstruct them later. It features optional metadata generation for reliable merging, even if filenames are tampered.

2. Splitting Process

When a file is split using the SplitFile class:

3. Metadata File Structure

The metadata.part file is 271 bytes long, containing:

This structure ensures validation and assists reassembly.

4. Merging Process

During merging via MergeFiles:

5. Tamper-Proof Mapping Using Headers

Each chunk includes a header containing its index and magic number. Even if a file is renamed, the index can be read via:

RandomAccessFile.readUnsignedByte(); // index
RandomAccessFile.readShort();       // magic number
A HashMap<Integer, File> maps index to chunk file, so the actual filename doesn't matter. This helps reconstruct the file in correct order.

6. Error Handling and Validation

7. Screenshots

Split Panel


Chunk files and metadata file after splitting


Merge Panel