I need to store data into files inside .jar file and read it again.
I know that I can use Class.getResourceAsStream() method but it returns an Inp
Class.getResourceAsStream()
Inp
Class.getResource() returns a URL. Theoretically, you can use this URL to create your InputStream and OutputStream. But in most cases, the generated JAR is a read-only file (or archive). So your application might trip when trying to use it.
Class.getResource()
InputStream
OutputStream