private static void copyResource(ClassLoader loader,String resourceName,File destination) throws IOException {
  if (destination.exists()) {
    return;
  }
  InputStream in=loader.getResourceAsStream(PACKAGE_PATH + resourceName);
  FileOutputStream out=new FileOutputStream(destination);
  Streams.copy(in,out);
  in.close();
  out.close();
}

private static void copyResource ( ClassLoader loader , String resourceName , File destination ) throws IOException { if ( destination . exists ( ) ) { return ; } InputStream in = loader . getResourceAsStream ( PACKAGE_PATH + resourceName ) ; FileOutputStream out = new FileOutputStream ( destination ) ; Streams . copy ( in , out ) ; in . close ( ) ; out . close ( ) ; }
copy a resource in the package directory to the indicated target file , but only if the target file doesn ' t exist .
