I\'m using getClass().getResourceAsStream(path) to read from bundle resources.
getClass().getResourceAsStream(path)
How can I know the file size before reading the entire stream?
I
This question has some specific solutions: How do I list the files inside a JAR file?, specifically, using a FileSystem API since Java 7.
It should work for files in a JAR and unpacked files. I'm not sure it will work for a JAR packed in a WAR, for instance.