code: public static long getTempUrlObjectLength(Path path, SwiftConnectionManager scm)
            throws IOException {
      final HttpHead head = new HttpHead(path.toString().replace("swift2d", "https"));
      final CloseableHttpResponse response = scm.createHttpConnection().execute(head);
      return Long.parseLong(response.getFirstHeader("Content-Length").getValue());
    }
docs: /*
  Sends a HEAD request to get an object's length