code: public void copyResourceToDir(String path, String filename, String dir) {
  		String fullpath = path + ProcessorConstants.SEPARATORCHAR + filename;
  		messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " javascript copy js : " + fullpath + " to : "+dir);
  		try (Writer writer = getFileObjectWriter(dir, "org.ocelotds."+filename)) {
  			bodyWriter.write(writer, OcelotProcessor.class.getResourceAsStream(fullpath));
  		} catch (IOException ex) {
  			messager.printMessage(Diagnostic.Kind.MANDATORY_WARNING, " FAILED TO CREATE : " + filename);
  		}
  	}
docs: copy path/filename in dir
  @param path
  @param filename
  @param dir