I am reading the Blob instance as an input stream from the database and writing that each individual input stream into a single separate File at the local filesystem. This results in about the millions of var-binary files are being created, so I would like to create a single File for each and every Blob instance rather than creating an individual file for each Blob instance. I will also restore these Blob instance back into the database.
I also find an option to create a single tar file and add each Blob instance as a stream to tar file but then I found this, which says-
It has a limitation and because of that, it is hard to add or remove single files without copying the whole archive.
So I wonder if it would be possible that I can write all Blob instance into a single file and read them back correctly from that single file?
Please suggest me how can I achieve this?
Will RandomAccessFile help me in this strategy because it has file pointer?