Formatter.FormatIpAddress(Int32) Method

Definition

Caution

deprecated

Returns a string in the canonical IPv4 format ###.

[Android.Runtime.Register("formatIpAddress", "(I)Ljava/lang/String;", "")]
[System.Obsolete("deprecated")]
public static string? FormatIpAddress (int ipv4Address);
[<Android.Runtime.Register("formatIpAddress", "(I)Ljava/lang/String;", "")>]
[<System.Obsolete("deprecated")>]
static member FormatIpAddress : int -> string

Parameters

ipv4Address
Int32

Returns

Attributes

Remarks

Returns a string in the canonical IPv4 format ###.###.###.### from a packed integer containing the IP address. The IPv4 address is expected to be in little-endian format (LSB first). That is, 0x01020304 will return "4.3.2.1".

This member is deprecated. Use java.net.InetAddress#getHostAddress(), which supports both IPv4 and IPv6 addresses. This method does not support IPv6 addresses.

Java documentation for android.text.format.Formatter.formatIpAddress(int).

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to