code: public void copyResource(String filename, String resource) throws IOException {
      write(filename, IOUtils.toByteArray(getClass().getResource(resource)));
    }
docs: Copies the content of the given resource into Hadoop.
  
  @param filename File to be created
  @param resource Resource to copy
  @throws IOException Anything