code: @Override
      public void write(String resourceId, byte[] data) {
          try {
              File file = this.cachedResources.get(resourceId);
              if (Objects.isNull(file)) {
                  file = new File(localDir, resourceId + SUFFIX);
                  Files.write(file.toPath(), data);
                  this.cachedResources.put(resourceId, file);
              } else {
              	Files.write(file.toPath(), data);
              }
          } catch (Exception e) {
              LOG.log(Level.WARNING, "Caching of resource failed: " + resourceId, e);
          }
      }
docs: /*
  (non-Javadoc)
  
  @see
  org.javamoney.moneta.loader.format.ResourceCache#write(java.lang.String
  , byte[])