Package system.net
Class IPAddress
- java.lang.Object
-
- org.mases.jcobridge.netreflection.NetObject
-
- system.net.IPAddress
-
- All Implemented Interfaces:
IJCOBridgeReflected
,IFormattable
public class IPAddress extends NetObject implements IFormattable
The base .NET class managing System.Net.IPAddress, System.Net.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a..NET documentation at https://docs.microsoft.com/en-us/dotnet/api/System.Net.IPAddress
Powered by JCOBridge: more info at https://www.jcobridge.com
- Author:
- MASES s.r.l https://masesgroup.com
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
assemblyFullName
Fully assembly qualified name: System.Net.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3astatic java.lang.String
assemblyShortName
Assembly name: System.Net.Primitivesstatic java.lang.String
className
Qualified class name: System.Net.IPAddressstatic JCType
classType
The type managed from JCOBridge.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static IPAddress
cast(IJCOBridgeReflected from)
Try to cast theIJCOBridgeReflected
instance intoIPAddress
, a cast assert is made to check if types are compatible.long
getAddress()
byte[]
GetAddressBytes()
AddressFamily
getAddressFamily()
boolean
getIsIPv4MappedToIPv6()
boolean
getIsIPv6LinkLocal()
boolean
getIsIPv6Multicast()
boolean
getIsIPv6SiteLocal()
boolean
getIsIPv6Teredo()
boolean
getIsIPv6UniqueLocal()
java.lang.String
getJCOAssemblyName()
Returns the reflected Assembly namejava.lang.String
getJCOClassName()
Returns the reflected Class namejava.lang.Object
getJCOInstance()
Returns the instantiated classjava.lang.String
getJCOObjectName()
Returns the reflected Class name used to build the objectJCType
getJCOType()
Returns the instantiated class Typelong
getScopeId()
static int
HostToNetworkOrder(int host)
static long
HostToNetworkOrder(long host)
static short
HostToNetworkOrder(short host)
static boolean
IsLoopback(IPAddress address)
IPAddress
MapToIPv4()
IPAddress
MapToIPv6()
static int
NetworkToHostOrder(int network)
static long
NetworkToHostOrder(long network)
static short
NetworkToHostOrder(short network)
static IPAddress
Parse(java.lang.String ipString)
void
setAddress(long Address)
void
setJCOInstance(JCObject instance)
void
setScopeId(long ScopeId)
static boolean
TryParse(java.lang.String ipString, JCORefOut<IPAddress> address)
-
Methods inherited from class org.mases.jcobridge.netreflection.NetObject
Equals, Equals, GetHashCode, GetType, hashCode, toString, ToString
-
Methods inherited from interface system.IFormattable
ToString
-
-
-
-
Field Detail
-
assemblyFullName
public static final java.lang.String assemblyFullName
Fully assembly qualified name: System.Net.Primitives, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a- See Also:
- Constant Field Values
-
assemblyShortName
public static final java.lang.String assemblyShortName
Assembly name: System.Net.Primitives- See Also:
- Constant Field Values
-
className
public static final java.lang.String className
Qualified class name: System.Net.IPAddress- See Also:
- Constant Field Values
-
-
Constructor Detail
-
IPAddress
public IPAddress(java.lang.Object instance) throws java.lang.Throwable
Internal constructor. Use with caution- Throws:
java.lang.Throwable
-
IPAddress
public IPAddress() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
IPAddress
public IPAddress(byte[] address, long scopeid) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
-
IPAddress
public IPAddress(byte[] address) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
IPAddress
public IPAddress(long newAddress) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException, FormatException
-
-
Method Detail
-
getJCOAssemblyName
public java.lang.String getJCOAssemblyName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Assembly name- Specified by:
getJCOAssemblyName
in interfaceIFormattable
- Specified by:
getJCOAssemblyName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOAssemblyName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Assembly
-
getJCOClassName
public java.lang.String getJCOClassName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name- Specified by:
getJCOClassName
in interfaceIFormattable
- Specified by:
getJCOClassName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOClassName
in classNetObject
- Returns:
- A
String
representing the Fullname of reflected Class
-
getJCOObjectName
public java.lang.String getJCOObjectName()
Description copied from interface:IJCOBridgeReflected
Returns the reflected Class name used to build the object- Specified by:
getJCOObjectName
in interfaceIFormattable
- Specified by:
getJCOObjectName
in interfaceIJCOBridgeReflected
- Overrides:
getJCOObjectName
in classNetObject
- Returns:
- A
String
representing the name used to allocated the object in CLR context
-
getJCOInstance
public java.lang.Object getJCOInstance()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class- Specified by:
getJCOInstance
in interfaceIFormattable
- Specified by:
getJCOInstance
in interfaceIJCOBridgeReflected
- Overrides:
getJCOInstance
in classNetObject
- Returns:
- An
Object
representing the CLR instance of the instantiated Class
-
setJCOInstance
public void setJCOInstance(JCObject instance)
- Overrides:
setJCOInstance
in classNetObject
-
getJCOType
public JCType getJCOType()
Description copied from interface:IJCOBridgeReflected
Returns the instantiated class Type- Specified by:
getJCOType
in interfaceIFormattable
- Specified by:
getJCOType
in interfaceIJCOBridgeReflected
- Overrides:
getJCOType
in classNetObject
- Returns:
- A
JCType
representing the CLR Type of the instantiated Class
-
cast
public static IPAddress cast(IJCOBridgeReflected from) throws java.lang.Throwable
Try to cast theIJCOBridgeReflected
instance intoIPAddress
, a cast assert is made to check if types are compatible.- Parameters:
from
-IJCOBridgeReflected
instance to be casted- Returns:
IPAddress
instance- Throws:
java.lang.Throwable
- in case of error during cast operation
-
IsLoopback
public static boolean IsLoopback(IPAddress address) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException
-
TryParse
public static boolean TryParse(java.lang.String ipString, JCORefOut<IPAddress> address) throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, NullReferenceException, ArgumentNullException, OutOfMemoryException, FormatException
-
GetAddressBytes
public byte[] GetAddressBytes() throws java.lang.Throwable, ArgumentException, NotSupportedException, InvalidOperationException, ArgumentOutOfRangeException, ArrayTypeMismatchException, PlatformNotSupportedException
-
HostToNetworkOrder
public static short HostToNetworkOrder(short host) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
NetworkToHostOrder
public static short NetworkToHostOrder(short network) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
HostToNetworkOrder
public static int HostToNetworkOrder(int host) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
NetworkToHostOrder
public static int NetworkToHostOrder(int network) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
HostToNetworkOrder
public static long HostToNetworkOrder(long host) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
NetworkToHostOrder
public static long NetworkToHostOrder(long network) throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
MapToIPv4
public IPAddress MapToIPv4() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, IndexOutOfRangeException, FormatException
-
MapToIPv6
public IPAddress MapToIPv6() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
Parse
public static IPAddress Parse(java.lang.String ipString) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, NotSupportedException, ObjectDisposedException, InvalidOperationException, RankException, ArrayTypeMismatchException, ArgumentNullException, IndexOutOfRangeException, NullReferenceException, OutOfMemoryException, FormatException
- Throws:
java.lang.Throwable
ArgumentException
ArgumentOutOfRangeException
PlatformNotSupportedException
NotSupportedException
ObjectDisposedException
InvalidOperationException
RankException
ArrayTypeMismatchException
ArgumentNullException
IndexOutOfRangeException
NullReferenceException
OutOfMemoryException
FormatException
-
getIsIPv4MappedToIPv6
public boolean getIsIPv4MappedToIPv6() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, ArgumentNullException, InvalidOperationException, PlatformNotSupportedException, ArrayTypeMismatchException, NotSupportedException, ObjectDisposedException, RankException, IndexOutOfRangeException
-
getIsIPv6LinkLocal
public boolean getIsIPv6LinkLocal() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getIsIPv6Multicast
public boolean getIsIPv6Multicast() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getIsIPv6SiteLocal
public boolean getIsIPv6SiteLocal() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getIsIPv6Teredo
public boolean getIsIPv6Teredo() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getIsIPv6UniqueLocal
public boolean getIsIPv6UniqueLocal() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
getAddress
public long getAddress() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, SocketException
-
setAddress
public void setAddress(long Address) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, SocketException
-
getScopeId
public long getScopeId() throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, SocketException
-
setScopeId
public void setScopeId(long ScopeId) throws java.lang.Throwable, ArgumentException, ArgumentOutOfRangeException, PlatformNotSupportedException, IndexOutOfRangeException, FormatException, InvalidOperationException, SocketException, ArgumentNullException, NotSupportedException
-
getAddressFamily
public AddressFamily getAddressFamily() throws java.lang.Throwable
- Throws:
java.lang.Throwable
-
-