Class Address
java.lang.Object
com.frostwire.jlibtorrent.Address
- All Implemented Interfaces:
Cloneable,Comparable<Address>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()intCompare addresses for ordering.booleanDetermine whether the address is a loopback address.booleanDetermine whether the address is a multicast address.booleanDetermine whether the address is unspecified.booleanisV4()Get whether the address is an IP version 4 address.booleanisV6()Get whether the address is an IP version 6 address.swig()toString()Get the address as a string in dotted decimal format.
-
Constructor Details
-
Address
- Parameters:
addr- the native object
-
Address
Create an address from an IPv4 address string in dotted decimal form, or from an IPv6 address in hexadecimal notation.- Parameters:
ip- the ip string representation
-
Address
public Address()
-
-
Method Details
-
swig
- Returns:
- native object
-
isV4
public boolean isV4()Get whether the address is an IP version 4 address.- Returns:
- if it's an IPv4 address
-
isV6
public boolean isV6()Get whether the address is an IP version 6 address.- Returns:
- if it's an IPv6 address
-
isLoopback
public boolean isLoopback()Determine whether the address is a loopback address.- Returns:
- if it's a loopback address
-
isUnspecified
public boolean isUnspecified()Determine whether the address is unspecified.- Returns:
- if it's an unspecified address
-
isMulticast
public boolean isMulticast()Determine whether the address is a multicast address.- Returns:
- if it's an multicast address
-
compareTo
Compare addresses for ordering.- Specified by:
compareToin interfaceComparable<Address>- Parameters:
o- the other address- Returns:
- -1, 0 or 1
-
toString
-
clone
-