| java.lang.Object uk.co.whisperingwind.framework.JarFile
JarFile | public class JarFile (Code) | | Methods to access files contained in the same Jar file I am using.
|
Method Summary | |
public static void | copyTextFromJar(String fileName, File target) Copy a file, a line at a time, from the .JAR file to an output
file. | public static InputStream | openFileFromJar(String fileName) Open an input stream from a file in my .JAR.
Parameters: fileName - the name of the file to open. |
copyTextFromJar | public static void copyTextFromJar(String fileName, File target) throws IOException(Code) | | Copy a file, a line at a time, from the .JAR file to an output
file. By using readLine and println, I can be sure the target
file will have the correct text file format for the platform I
am running on.
Parameters: fileName - the name of the input file (in the .JAR). Parameters: target - the target File -- the file to which the outputwill be written. exception: IOException - if the input file cannot be opened or theoutput file cannot be written. |
openFileFromJar | public static InputStream openFileFromJar(String fileName) throws IOException(Code) | | Open an input stream from a file in my .JAR.
Parameters: fileName - the name of the file to open. an InputStream for the selected file. exception: IOException - if the file cannot be opened. |
|
|