In Java 6 and earlier it is difficult because classes like File
and FileInputStream
provide no way to dispatch to different "virtual file systems" in Java space.
In Java 7, there is support for virtual file systems; see Developing a Custom File System Provider. I don't know whether this will allow you to do what you want to do, but it is a good place to start looking.
Meh. Being the fact that there doesn't seem to actually be any fake file system, I guess I'll just implement a minimal implementation by myself. I win nothing by using FileSystemProvider
Actually, you DO win by using FileSystemProvider:
You implement something that (if released under an open source license) could be very useful to other people in your position, and for other purposes.
You make it easier for yourself if you decide to switch to a FileSystemProvider that someone else might be working on right now.