FT-TNG is FileTransformer: The Next Generation, a Java 21 command-line utility for safely splitting, verifying, and joining file chunks.
FT-TNG modernizes a Java file-splitting utility originally built for moving large data extracts through a constrained enterprise and SAP environment. The original ran on Java 1.4 and relied on perimeter controls and trusted infrastructure. This version rebuilds the idea as a cross-platform Java 21 CLI with streamed I/O, deterministic chunks, SHA-256 manifests, verification, and safe reconstruction.
This repository contains the v0.1.0 implementation of FT-TNG: a Java 21 command-line tool that can split files into deterministic chunks, verify chunk integrity through a JSON manifest, and safely reconstruct the original file.
- Java 21
- No global Maven install is required. Use the project Maven wrapper.
On Windows:
mvnw.cmd clean verifyOn Linux or macOS:
./mvnw clean verifyThe first run downloads a pinned Maven distribution into .mvn/wrapper/ inside this project. Maven dependencies are cached in .mvn/repository/ for this project instead of your global Maven cache.
The executable JAR is produced under target/.
java -jar target/ft-tng-0.1.0.jar --help
java -jar target/ft-tng-0.1.0.jar split --help
java -jar target/ft-tng-0.1.0.jar verify --help
java -jar target/ft-tng-0.1.0.jar join --helpjava -jar target/ft-tng-0.1.0.jar split database-export.bin --chunk-size 100MiB --output database-export-parts
java -jar target/ft-tng-0.1.0.jar verify database-export-parts/manifest.json
java -jar target/ft-tng-0.1.0.jar join database-export-parts/manifest.json --output restored/database-export.binAll three commands accept optional operational JSON Lines logging:
java -jar target/ft-tng-0.1.0.jar verify database-export-parts/manifest.json --log-json verify.jsonl0 Success
2 Invalid command-line input
3 Source, manifest, or requested path invalid
4 Required chunk missing
5 Integrity verification failed
6 Output already exists
7 Filesystem or general I/O failure
8 Unsupported manifest format
9 Internal application failure
- Binary sizes accept positive whole numbers with
B,KiB,MiB, orGiB. - Bare numbers, decimal values, SI units such as
MB, zero, and negative sizes are rejected. - Chunk filenames use
<original-name>.part<sequence>with a six-digit sequence. - Splits requiring more than
999999chunks are rejected. - Manifests can be written and read as stable, pretty-printed JSON.
- SHA-256 digests use the Java standard library and lowercase hexadecimal output.
- The core splitter streams source bytes into deterministic chunks and writes a manifest.
- The core verifier validates manifest semantics, safe chunk names, chunk existence, sizes, hashes, and total bytes.
- The core assembler verifies chunks first, reconstructs through a temporary file, refuses overwrite, and validates final size/hash before moving output into place.
- The CLI maps expected failures to documented process exit codes.
- Optional
--log-jsonwrites one JSON object per line for command start, completion, and failure events.
SHA-256 verifies chunk integrity relative to the manifest. It does not authenticate the manifest or prove who created it. An attacker able to replace both the chunks and manifest is outside the v0.1.0 trust model.
v0.1.0 provides a complete split -> verify -> join vertical slice with deterministic chunk names, SHA-256 integrity checks, a versioned JSON manifest, safe reconstruction, and optional JSON Lines operational logging.
The archive/ directory contains recovered historical source for project context only. It is not compiled, supported, or treated as the implementation basis for FT-TNG.
FT-TNG is licensed under the Apache License, Version 2.0. See LICENSE.