Class X509IpAddress
- java.lang.Object
-
- org.xwiki.crypto.pkix.params.x509certificate.extension.X509IpAddress
-
- All Implemented Interfaces:
org.xwiki.crypto.pkix.internal.extension.BcGeneralName
,X509GeneralName
,X509StringGeneralName
public class X509IpAddress extends Object implements X509StringGeneralName, org.xwiki.crypto.pkix.internal.extension.BcGeneralName
IP address general name.- Since:
- 5.4
- Version:
- $Id: 13ebca4e9e268304d6c88e258e1ab60916b4ca05 $
-
-
Constructor Summary
Constructors Constructor Description X509IpAddress(String ipAddress)
Construct a IP address general name from an ip address.X509IpAddress(InetAddress ipAddress)
Construct a IP address general name from an ip address.X509IpAddress(InetAddress ipAddress, InetAddress ipMask)
Construct a IP address general name from an ip address.X509IpAddress(org.bouncycastle.asn1.x509.GeneralName name)
Create a new instance from a Bouncy Castle general name.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.bouncycastle.asn1.x509.GeneralName
getGeneralName()
InetAddress
getIpAddress()
InetAddress
getIpMask()
String
getName()
-
-
-
Constructor Detail
-
X509IpAddress
public X509IpAddress(String ipAddress)
Construct a IP address general name from an ip address.- Parameters:
ipAddress
- the ip address.
-
X509IpAddress
public X509IpAddress(InetAddress ipAddress)
Construct a IP address general name from an ip address.- Parameters:
ipAddress
- the ip address.
-
X509IpAddress
public X509IpAddress(InetAddress ipAddress, InetAddress ipMask)
Construct a IP address general name from an ip address.- Parameters:
ipAddress
- the ip address.ipMask
- the ip mask.
-
X509IpAddress
public X509IpAddress(org.bouncycastle.asn1.x509.GeneralName name)
Create a new instance from a Bouncy Castle general name.- Parameters:
name
- the Bouncy Castle general name.
-
-
Method Detail
-
getIpAddress
public InetAddress getIpAddress() throws UnknownHostException
- Returns:
- the ip net address represented by this general name.
- Throws:
UnknownHostException
- if the ip address is malformed.
-
getIpMask
public InetAddress getIpMask() throws UnknownHostException
- Returns:
- the ip net mask represented by this general name, or null if no mask was given.
- Throws:
UnknownHostException
- if the ip mask is malformed.
-
getName
public String getName()
- Specified by:
getName
in interfaceX509StringGeneralName
- Returns:
- the string representation of this general name.
-
getGeneralName
public org.bouncycastle.asn1.x509.GeneralName getGeneralName()
- Specified by:
getGeneralName
in interfaceorg.xwiki.crypto.pkix.internal.extension.BcGeneralName
- Returns:
- the native Bouncy Castle general name.
-
-