code: public static URI createSha1Urn(final File file) throws IOException
          {
          LOG.debug("Creating SHA1 URN.");
          if (file.length() == 0L) 
              {
              throw new IOException("Cannot publish empty files!!");
              }
          return createSha1Urn(new FileInputStream(file));
          }
docs: Create a new SHA1 hash URI for the specified file on disk.
  
  @param file the file to construct the hash from
  @return The SHA1 hash as a URI.
  @throws IOException If there is an error creating the hash or if the
  specified algorithm cannot be found.