I have a program and I would like it to create a JAR file. Obviously to create a text file you'd just use some FileWriter class, but what arguments would I pass to .write() if it isn't text? For example given the file A.jar, how could the program B.class actually write a copy of A.jar to the computer it's run on?
Basically I'm asking, how do installers work?