Inet4Address Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
This class represents an Internet Protocol version 4 (IPv4) address.
[Android.Runtime.Register("java/net/Inet4Address", DoNotGenerateAcw=true)]
public sealed class Inet4Address : Java.Net.InetAddress
[<Android.Runtime.Register("java/net/Inet4Address", DoNotGenerateAcw=true)>]
type Inet4Address = class
inherit InetAddress
- Inheritance
- Attributes
Remarks
This class represents an Internet Protocol version 4 (IPv4) address. Defined by RFC 790: Assigned Numbershttp://www.ietf.org/rfc/rfc790.txt, RFC 1918: Address Allocation for Private Internetshttp://www.ietf.org/rfc/rfc1918.txt, and RFC 2365: Administratively Scoped IP Multicasthttp://www.ietf.org/rfc/rfc2365.txt<h3> "format">Textual representation of IP addresses</h3>
Textual representation of IPv4 address used as input to methods takes one of the following forms:
<blockquote><ul style="list-style-type:none"> <li>d.d.d.d
</li> <li>d.d.d
</li> <li>d.d
</li> <li>d
</li> </ul></blockquote>
When four parts are specified, each is interpreted as a byte of data and assigned, from left to right, to the four bytes of an IPv4 address.
When a three part address is specified, the last part is interpreted as a 16-bit quantity and placed in the right most two bytes of the network address. This makes the three part address format convenient for specifying Class B net- work addresses as 128.net.host.
When a two part address is supplied, the last part is interpreted as a 24-bit quantity and placed in the right most three bytes of the network address. This makes the two part address format convenient for specifying Class A network addresses as net.host.
When only one part is given, the value is stored directly in the network address without any byte rearrangement.
For methods that return a textual representation as output value, the first form, i.e. a dotted-quad string, is used.
<h4> The Scope of a Multicast Address </h4>
Historically the IPv4 TTL field in the IP header has doubled as a multicast scope field: a TTL of 0 means node-local, 1 means link-local, up through 32 means site-local, up through 64 means region-local, up through 128 means continent-local, and up through 255 are global. However, the administrative scoping is preferred. Please refer to RFC 2365: Administratively Scoped IP Multicasthttp://www.ietf.org/rfc/rfc2365.txt
Added in 1.4.
Java documentation for java.net.Inet4Address
.
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.
Properties
CanonicalHostName |
Gets the fully qualified domain name for this IP address. (Inherited from InetAddress) |
Class |
Returns the runtime class of this |
Handle |
The handle to the underlying Android instance. (Inherited from Object) |
HostAddress |
Returns the IP address string in textual presentation. (Inherited from InetAddress) |
HostName |
Gets the host name for this IP address. (Inherited from InetAddress) |
IsAnyLocalAddress |
Utility routine to check if the InetAddress in a wildcard address. (Inherited from InetAddress) |
IsLinkLocalAddress |
Utility routine to check if the InetAddress is an link local address. (Inherited from InetAddress) |
IsLoopbackAddress |
Utility routine to check if the InetAddress is a loopback address. (Inherited from InetAddress) |
IsMCGlobal |
Utility routine to check if the multicast address has global scope. (Inherited from InetAddress) |
IsMCLinkLocal |
Utility routine to check if the multicast address has link scope. (Inherited from InetAddress) |
IsMCNodeLocal |
Utility routine to check if the multicast address has node scope. (Inherited from InetAddress) |
IsMCOrgLocal |
Utility routine to check if the multicast address has organization scope. (Inherited from InetAddress) |
IsMCSiteLocal |
Utility routine to check if the multicast address has site scope. (Inherited from InetAddress) |
IsMulticastAddress |
Utility routine to check if the InetAddress is an IP multicast address. (Inherited from InetAddress) |
IsSiteLocalAddress |
Utility routine to check if the InetAddress is a site local address. (Inherited from InetAddress) |
JniIdentityHashCode | (Inherited from Object) |
JniPeerMembers | |
PeerReference | (Inherited from Object) |
ThresholdClass |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from InetAddress) |
ThresholdType |
This API supports the Mono for Android infrastructure and is not intended to be used directly from your code. (Inherited from InetAddress) |
Methods
Clone() |
Creates and returns a copy of this object. (Inherited from Object) |
Dispose() | (Inherited from Object) |
Dispose(Boolean) | (Inherited from Object) |
Equals(Object) |
Indicates whether some other object is "equal to" this one. (Inherited from Object) |
GetAddress() |
Returns the raw IP address of this |
GetHashCode() |
Returns a hash code value for the object. (Inherited from Object) |
IsReachable(Int32) |
Test whether that address is reachable. (Inherited from InetAddress) |
IsReachable(NetworkInterface, Int32, Int32) |
Test whether that address is reachable. (Inherited from InetAddress) |
JavaFinalize() |
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. (Inherited from Object) |
Notify() |
Wakes up a single thread that is waiting on this object's monitor. (Inherited from Object) |
NotifyAll() |
Wakes up all threads that are waiting on this object's monitor. (Inherited from Object) |
SetHandle(IntPtr, JniHandleOwnership) |
Sets the Handle property. (Inherited from Object) |
ToArray<T>() | (Inherited from Object) |
ToString() |
Returns a string representation of the object. (Inherited from Object) |
UnregisterFromRuntime() | (Inherited from Object) |
Wait() |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>. (Inherited from Object) |
Wait(Int64, Int32) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Wait(Int64) |
Causes the current thread to wait until it is awakened, typically by being <em>notified</em> or <em>interrupted</em>, or until a certain amount of real time has elapsed. (Inherited from Object) |
Explicit Interface Implementations
IJavaPeerable.Disposed() | (Inherited from Object) |
IJavaPeerable.DisposeUnlessReferenced() | (Inherited from Object) |
IJavaPeerable.Finalized() | (Inherited from Object) |
IJavaPeerable.JniManagedPeerState | (Inherited from Object) |
IJavaPeerable.SetJniIdentityHashCode(Int32) | (Inherited from Object) |
IJavaPeerable.SetJniManagedPeerState(JniManagedPeerStates) | (Inherited from Object) |
IJavaPeerable.SetPeerReference(JniObjectReference) | (Inherited from Object) |
Extension Methods
JavaCast<TResult>(IJavaObject) |
Performs an Android runtime-checked type conversion. |
JavaCast<TResult>(IJavaObject) | |
GetJniTypeName(IJavaPeerable) |