code: @Trivial
      private static URI getURI(final File file) {
          return AccessController.doPrivileged( new PrivilegedAction<URI>() {
              @Override
              public URI run() {
                  return file.toURI();
              }
          } );
      }
docs: File utility ...