exense-basic-commons/src/main/java/ch/exense/commons/io/FileHelper.java
/**
	 * Extract a resource and copy it to a a temporary file
	 * @param clazz the class the resource is associated with
	 * @param resourceName the name of the resource
	 * @return the temporary {@link File}
	 * @throws IOException
	 */
Extract a resource and copy it to a a temporary file
@param clazz the class the resource is associated with
@param resourceName the name of the resource
@return the temporary  File
@throws IOException
Extract a resource and copy it to a a temporary file @param clazz the class the resource is associated with @param resourceName the name of the resource @return the temporary File @throws IOException
public static File extractResourceToTempFile(Class<?> clazz, String resourceName) throws IOException {
		Path tempFile = Files.createTempFile("resourceName",".tmp");
		Files.write(tempFile, readResource(clazz, resourceName).getBytes(), StandardOpenOption.APPEND);
		tempFile.toFile().deleteOnExit();
		return tempFile.toFile();
	}
public static File extractResourceToTempFile ( Class < ? > clazz , String resourceName ) throws IOException { Path tempFile = Files . createTempFile ( "resourceName" , ".tmp" ) ; Files . write ( tempFile , readResource ( clazz , resourceName ) . getBytes ( ) , StandardOpenOption . APPEND ) ; tempFile . toFile ( ) . deleteOnExit ( ) ; return tempFile . toFile ( ) ; }
Extract a resource and copy it to a a temporary file
 @param clazz the class the resource is associated with
 @param resourceName the name of the resource
 @return the temporary {@link File}
 @throws IOException
Extract a resource and copy it to a a temporary file @param clazz the class the resource is associated with @param resourceName the name of the resource @return the temporary { @link File } @throws IOException