I can locate a file that is in my class folder for INPUT using the following code:
ClassLoader loader = getClass().getClassLoader();
InputStream is = loader.getResourceAsStream( "AFile.txt" );
How to locate a file (in the same folder as the class) for OUTPUT using similar trick? getResourceAsStream() does not return an OutputStream!
Thanks.
ClassLoader loader = getClass().getClassLoader();
InputStream is = loader.getResourceAsStream( "AFile.txt" );
How to locate a file (in the same folder as the class) for OUTPUT using similar trick? getResourceAsStream() does not return an OutputStream!
Thanks.