public interface RegisteredDomain
The primary purpose of this class is to determine if domains are safe to use in various use-cases.
| 限定符和类型 | 接口和说明 |
|---|---|
static class |
RegisteredDomain.Type |
| 限定符和类型 | 方法和说明 |
|---|---|
static Optional<RegisteredDomain> |
from(String domain)
Returns an
Optional<RegisteredDomain> representing the
registered part of the specified domain. |
String |
name()
Returns the name of the registered domain.
|
String |
publicSuffix()
Returns the public suffix of the registered domain.
|
RegisteredDomain.Type |
type()
Returns the type of the registered domain.
|
String name()
RegisteredDomain.Type type()
String publicSuffix()
static Optional<RegisteredDomain> from(String domain)
Optional<RegisteredDomain> representing the
registered part of the specified domain.
The default implementation is based on the legacy
sun.net.RegisteredDomain class which is no longer maintained.
It should be updated or replaced with an appropriate implementation.domain - the domain nameOptional<RegisteredDomain>; the Optional is
empty if the domain is unknown or not registerableNullPointerException - if domain is nullCopyright © 2023. All rights reserved.