Class InetAddressBean


  • public class InetAddressBean
    extends Object
    • Method Detail

      • getCanonicalLocalHostName

        @Nullable
        public static @Nullable String getCanonicalLocalHostName()
        Returns:
        Canonical name of the local host or null if it could not be found
      • getLocalCanonicalHostName

        @Nullable
        public static @Nullable String getLocalCanonicalHostName​(@Nullable
                                                                 @Nullable String defaultName)
        Parameters:
        defaultName -
        Returns:
        Canonical name of the local host. If it fails the defaultName will be returned
      • getLocalHostName

        @Nullable
        public static @Nullable String getLocalHostName​(@Nullable
                                                        @Nullable String defaultName)
        Returns the name of the local host or defaultName if local host could not be found
        Parameters:
        defaultName -
        Returns:
      • getLocalHostAddress

        @Deprecated
        public static String getLocalHostAddress​(String defaultAddress)
        Deprecated.
        since 6.7 use getLocalHostAddress() instead
        Returns the address of the local host or defaultAddress if local host could not be found
      • getLocalHostAddressForUrl

        public static Optional<String> getLocalHostAddressForUrl()
        Returns the address of the local host or defaultAddress if local host could not be found. The address can be used directly in an URL - IPv6 addresses are already correctly formatted.
      • getLoopback

        @NotNull
        public static @NotNull InetAddress getLoopback()