NetworkHostAndPort.Companion
Keywords: net.corda.core.utilities.NetworkHostAndPort.Companion class
Date: 2023-09-18

net.corda.core.utilities

## Class NetworkHostAndPort.Companion

- net.corda.core.utilities.NetworkHostAndPort.Companion

- Enclosing class:
    NetworkHostAndPort

      public static class NetworkHostAndPort.Companion

- - ### Method Detail

    - #### parse

          @JvmStatic
           @NotNull
          public NetworkHostAndPort parse(@NotNull
                                                               java.lang.String str)

      Parses a string of the form host:port into a `class NetworkHostAndPort`. The host part may be a hostname or IP address. If it's an IPv6 address, it must be enclosed in square brackets. Note this does not parse the toString of a resolved java.net.InetSocketAddress, which is of a host/IP:port form.

      Throws:
        `IllegalArgumentException` - if the port is missing, the string is garbage, or the NetworkHostAndPort constructor rejected the parsed parts.
      See Also:
        `class NetworkHostAndPort`, java.net.InetSocketAddress