code: public static URL createUrl(final URL baseUrl, final String path, final String filename) {
          checkNotNull("baseUrl", baseUrl);
          checkNotNull("filename", filename);
          try {
              String baseUrlStr = baseUrl.toString();
              if (!baseUrlStr.endsWith(SLASH)) {
                  baseUrlStr = baseUrlStr + SLASH;
              }
              final String pathStr;
              if ((path == null) || (path.length() == 0)) {
                  pathStr = "";
              } else {
                  if (path.endsWith(SLASH)) {
                      pathStr = path;
                  } else {
                      pathStr = path + SLASH;
                  }
              }
              return new URL(baseUrlStr + pathStr + filename);
          } catch (final IOException ex) {
              throw new RuntimeException(ex);
          }
      }
docs: Creates an URL based on a directory a relative path and a filename.
  
  @param baseUrl
  Directory URL with or without slash ("/") at the end of the string - Cannot be <code>null</code>.
  @param path
  Relative path inside the base URL (with or without slash ("/") at the end of the string) - Can be <code>null</code> or an
  empty string.
  @param filename
  Filename without path - Cannot be <code>null</code>.
  
  @return URL.