Before sending a file to a remote machine, I'm sharding it into multiple smaller pieces locally.
Once the file is split into shards, I write the objects using and ObjectOutputStream
.
Can I read multiple shard
objects from file, using a ObjectInputStream
, into a single object? I see no immediate way to append to the ObjectInputStream
.
So basically, the flow I'm hoping to have would go:
- Shard File
- Split file into multiple shards
- Write each shard using
ooo.writeObject(shard)
- (e.g., shard.1, shard.2, shard.3, ...)
- Merge File
- From a list of shard files, use an
ObjectInputStream
to read/combine them back into their original object.
- From a list of shard files, use an