code: protected String toFilename(final Resource resource) throws UnsupportedOperationException {
          if (resource instanceof FileResource) {
              return ((FileResource) resource).getFile().getPath();
          }
  
          throw new UnsupportedOperationException("Unsupported resource type: " + resource);
      }
docs: Creates a filename string to externalize, based on a given
  {@link Resource}.
  
  @param resource
  @return
  @throws UnsupportedOperationException