code: public static boolean isSecure(URI uri) {
      Objects.requireNonNull(uri, "uri must not be null");
      return uri.getScheme().equals("wss") || uri.getScheme().equals("https");
    }
docs: Returns whether the URI has a secure schema. Secure is defined as being either {@code wss} or
  {@code https}.
  
  @param uri the URI to examine
  @return whether the URI has a secure schema
  @throws NullPointerException if {@code uri} is {@code null}