To the best of my knowledge, Class.getResourceAsStream() gets an InputStream directed at a file within the .jar file? If I'm wrong about this, please correct me.
Is there any way to temporarily 'load' an external file into the .jar, so that the getResourceAsStream() method can retrieve it?
For example loading C:/folder/file.txt into the .jar so that MyClass.class
.getResourceAsStream("file.txt") would return a working InputStream to the file, or at least a copy of it that has been 'loaded' temporarily into the .jar.
I'm sorry I've worded this so badly, I hope you can understand what I'm trying to do, wasn't quite sure how to explain it simply.