I have a file that is a package of other files. (essentially concatenation of files)
In my app I have a several things that use normal files(audio, images, video, etc).
But because I’m packing these files up into collections I cannot just pass them to these routines that use files. (I’m actually passing Paths or path strings so I’ll have to modify that but some stuff using files are library code)
What I need to do is pass them a file that is really only looking at the file inside the “collection file”. (so the reading should be limited only to an interval inside the file)
Is there anything in kotlin or java that can dot his for me? basically I pass the starting and end or length and the file and it returns a file that for all practical purposes looks as if that chunk of the file is an actual file? It’s all read only so.
What I do not want to do is write the file out to a temp file and load that. That is pointless and a waste of time and longevity.
I’m thinking I might have to extend File but I’m hoping it’s already been done. I can’t find anything though.