public static void copyClassLoadableResourceToFileSystem(String pathToResource, String outputPath) throws IOException{

		//TODO make sure that files exist
		File outputFile = createFile(outputPath);
		if(outputFile.isDirectory()) {
			outputFile = new File(outputFile.getPath() + '/' + getFileNameFromPath(pathToResource));
		}
		OutputStream output = new FileOutputStream(outputFile);
		copyClassLoadableResource(pathToResource, output);
		output.close();
	}
public static void copyClassLoadableResourceToFileSystem ( String pathToResource , String outputPath ) throws IOException { File outputFile = createFile ( outputPath ) ; if ( outputFile . isDirectory ( ) ) { outputFile = new File ( outputFile . getPath ( ) + '/' + getFileNameFromPath ( pathToResource ) ) ; } OutputStream output = new FileOutputStream ( outputFile ) ; copyClassLoadableResource ( pathToResource , output ) ; output . close ( ) ; }
@param pathToResource
@param outputPath
@throws IOException