getting file from inside jar

hello i’d like to deploy my game as jar and want to pack some files inside the jar.

i found that the only way to get data out of the jar is via class.getResource or class.getResourcesAsStream.

but how can i convert this inputstream to a file or a fileinputstream?

thanks!

What are you trying to do with it why you must use a FileInputStream?

because i want to call this function:

Font font = Font.createFont(Font.TRUETYPE_FONT, new File or FileInputStream );

createFont(int fontFormat, InputStream fontStream)

No FileInputStream required

thanks a lot riven!