io.imunity.vaadin.endpoint.common.consent_utils.URIPresentationHelper Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of unity-server-vaadin-endpoint-common Show documentation
Show all versions of unity-server-vaadin-endpoint-common Show documentation
Common Vaadin endpoint components
The newest version!
/*
* Copyright (c) 2021 Bixbit - Krzysztof Benedyczak. All rights reserved.
* See LICENCE.txt file for licensing information.
*/
package io.imunity.vaadin.endpoint.common.consent_utils;
import java.net.URI;
import java.net.URISyntaxException;
public class URIPresentationHelper
{
public static String getHumanReadableDomain(String url)
{
try
{
URI uri = new URI(url);
String host = uri.getHost();
return host == null ? url : host;
} catch (URISyntaxException e)
{
return url;
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy