/** * Returns a string representation of the IPv6 address. It will use shorthand notation and special notation for IPv4-mapped IPv6 * addresses whenever possible. * * @return String representation of the IPv6 address */ @Override public String toString() { if (isIPv4Mapped()) return toIPv4MappedAddressString(); else return toShortHandNotationString(); }
/** * Returns a string representation of the IPv6 address. It will use shorthand notation and special notation for IPv4-mapped IPv6 * addresses whenever possible. * * @return String representation of the IPv6 address */ @Override public String toString() { if (isIPv4Mapped()) return toIPv4MappedAddressString(); else return toShortHandNotationString(); }