-
- All Implemented Interfaces:
public final class NetworkKt
-
-
Field Summary
Fields Modifier and Type Field Description private final static InetAddressallInterfacesprivate final static InetAddressloopbackInterface
-
Method Summary
Modifier and Type Method Description final InetAddressgetAllInterfaces()Internet address used to bind services to all local network interfaces. final InetAddressgetLoopbackInterface()Internet address used to bind services to the loopback interface. final static InetAddressinetAddress(Byte bytes)Syntactic sugar to create an Internet address. final static IntegerfreePort()Return a random free port (not used by any other local process). final static BooleanisPortOpened(Integer port)Check if a port is already opened. final static IntegerresponseCode(URL $self)final static BooleanresponseSuccessful(URL $self)final static BooleanresponseFound(URL $self)final static Booleanexists(URL $self)final static URLfirstVariant(URL $self, String suffixes)final static URLlocalized(URL $self, Locale locale)-
-
Method Detail
-
getAllInterfaces
final InetAddress getAllInterfaces()
Internet address used to bind services to all local network interfaces.
-
getLoopbackInterface
final InetAddress getLoopbackInterface()
Internet address used to bind services to the loopback interface.
-
inetAddress
final static InetAddress inetAddress(Byte bytes)
Syntactic sugar to create an Internet address.
- Parameters:
bytes- Bytes used in the address.
-
freePort
final static Integer freePort()
Return a random free port (not used by any other local process).
-
isPortOpened
final static Boolean isPortOpened(Integer port)
Check if a port is already opened.
- Parameters:
port- Port number to check.
-
responseCode
final static Integer responseCode(URL $self)
-
responseSuccessful
final static Boolean responseSuccessful(URL $self)
-
responseFound
final static Boolean responseFound(URL $self)
-
exists
final static Boolean exists(URL $self)
-
firstVariant
final static URL firstVariant(URL $self, String suffixes)
-
localized
final static URL localized(URL $self, Locale locale)
-
-
-
-