public static void setETag(URIConverter uriConverter, URI file, String eTag) {
   try {
     if (eTag != null) {
       BaseUtil.writeFile(
           uriConverter, null, file.appendFileExtension("etag"), eTag.getBytes("UTF-8"));
     } else {
       BaseUtil.deleteFile(uriConverter, null, file);
     }
   } catch (IORuntimeException ex) {
     // If we can't write the ETag, perhaps some other process is writing it, but it's expected to
     // write the same ETag value.
   } catch (UnsupportedEncodingException ex) {
     // All systems support UTF-8.
   }
 }