code: public void loadFile(Resource res, String resourcePath) throws IOException {
  	res.createFile(true);
  	InputStream is = InfoImpl.class.getResourceAsStream(resourcePath);
  	IOUtil.copy(is, res, true);
      }
docs: create xml file from a resource definition
  
  @param res
  @param resourcePath
  @throws IOException