org.xwiki.crypto.pkix.params.x509certificate.extension
Class X509IpAddress

java.lang.Object
  extended by org.xwiki.crypto.pkix.params.x509certificate.extension.X509IpAddress
All Implemented Interfaces:
org.xwiki.crypto.pkix.internal.extension.BcGeneralName, X509GeneralName, X509StringGeneralName

@Unstable
public class X509IpAddress
extends Object
implements X509StringGeneralName, org.xwiki.crypto.pkix.internal.extension.BcGeneralName

IP address general name.

Since:
5.4
Version:
$Id: 7e2b7888d93705f0c134e4414d300dd696bd2395 $

Constructor Summary
X509IpAddress(org.bouncycastle.asn1.x509.GeneralName name)
          Create a new instance from a Bouncy Castle general name.
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(String ipAddress)
          Construct a IP address general name from an ip address.
 
Method Summary
 org.bouncycastle.asn1.x509.GeneralName getGeneralName()
           
 InetAddress getIpAddress()
           
 InetAddress getIpMask()
           
 String getName()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface X509StringGeneralName
Returns:
the string representation of this general name.

getGeneralName

public org.bouncycastle.asn1.x509.GeneralName getGeneralName()
Specified by:
getGeneralName in interface org.xwiki.crypto.pkix.internal.extension.BcGeneralName


Copyright © 2004–2014 XWiki. All rights reserved.