Package org.drasyl.util
Class InetSocketAddressUtil
java.lang.Object
org.drasyl.util.InetSocketAddressUtil
Utility class for operations on
URL
s.-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks equality ofa
andb
.static InetSocketAddress
Convert aString
to aInetSocketAddress
.static String
Convert aInetSocketAddress
to aString
.
-
Method Details
-
socketAddressFromString
- Parameters:
s
- address to deserialize- Returns:
InetSocketAddress
representation ofs
-
socketAddressToString
- Parameters:
s
- address to deserialize- Returns:
String
representation ofs
-
equalSocketAddress
public static boolean equalSocketAddress(@NonNull InetSocketAddress a, @NonNull InetSocketAddress b) Checks equality ofa
andb
. In comparison toInetSocketAddress.equals(Object)
, this method can also compare resolved with unresolved addresses.- Parameters:
a
- first address to checkb
- second address to check- Returns:
true
if both addresses are equal
-