public static void copyResourceFile ( String source , Path target ) throws IOException { InputStream resource = FsCrawlerUtil . class . getResourceAsStream ( source ) ; FileUtils . copyInputStreamToFile ( resource , target . toFile ( ) ) ; }
Copy a single resource file from the classpath or from a JAR .