Class IPv4Address
java.lang.Object
io.mola.galimatias.Host
io.mola.galimatias.IPv4Address
- All Implemented Interfaces:
Serializable
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final intprivate static final long -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanstatic IPv4AddressfromInet4Adress(Inet4Address inet4Address) Convert from @{java.net.Inet4Address}.private byte[]getBytes()inthashCode()static IPv4AddressparseIPv4Address(String input) Convert to @{java.net.InetAddress}.toString()
-
Field Details
-
serialVersionUID
private static final long serialVersionUID- See Also:
-
address
private final int address
-
-
Constructor Details
-
IPv4Address
private IPv4Address(byte[] addr)
-
-
Method Details
-
parseIPv4Address
- Throws:
GalimatiasParseException
-
toInetAddress
Convert to @{java.net.InetAddress}.- Returns:
- The IPv4 address as a @{java.net.InetAddress}.
- Throws:
UnknownHostException
-
fromInet4Adress
Convert from @{java.net.Inet4Address}.- Parameters:
inet4Address- The IPv4 address as a @{java.net.Inet4Address}.- Returns:
- The IPv4 address as a @{IPv4Address}.
-
getBytes
private byte[] getBytes() -
toString
-
toHumanString
- Specified by:
toHumanStringin classHost
-
equals
-
hashCode
-