public IPv4AddrIV(final String hostAddress) throws UnknownHostException {
  super(DTE.Extension);
  this.hostAddress=hostAddress;
  final Matcher matcher=pattern.matcher(hostAddress);
  final boolean matches=matcher.matches();
  if (matches) {
    final String ip=matcher.group(1);
    if (log.isDebugEnabled())     log.debug(ip);
    final String suffix=matcher.group(6);
    if (log.isDebugEnabled())     log.debug(suffix);
    final String[] s;
    if (suffix != null) {
      s=new String[5];
      System.arraycopy(ip.split("\\.",-1),0,s,0,4);
      s[4]=suffix;
    }
 else {
      s=ip.split("\\.",-1);
    }
    this.value=IPv4Address.IPv4Factory(s);
    if (value == null) {
      if (log.isDebugEnabled()) {
        log.debug("not a valid IP: " + hostAddress);
      }
      throw new UnknownHostException("not a valid IP: " + hostAddress);
    }
    if (log.isDebugEnabled()) {
      log.debug(value);
      log.debug(byteLength());
      log.debug(BytesUtil.toString(value.getBytes()));
    }
  }
 else {
    if (log.isDebugEnabled()) {
      log.debug("not a valid IP: " + hostAddress);
    }
    throw new UnknownHostException("Did not match REGEX - not a valid IP: " + hostAddress);
  }
}

public IPv4AddrIV ( final String hostAddress ) throws UnknownHostException { super ( DTE . Extension ) ; this . hostAddress = hostAddress ; final Matcher matcher = pattern . matcher ( hostAddress ) ; final boolean matches = matcher . matches ( ) ; if ( matches ) { final String ip = matcher . group ( 1 ) ; if ( log . isDebugEnabled ( ) ) log . debug ( ip ) ; final String suffix = matcher . group ( 6 ) ; if ( log . isDebugEnabled ( ) ) log . debug ( suffix ) ; final String [ ] s ; if ( suffix != null ) { s = new String [ 5 ] ; System . arraycopy ( ip . split ( "\\." , - 1 ) , 0 , s , 0 , 4 ) ; s [ 4 ] = suffix ; } else { s = ip . split ( "\\." , - 1 ) ; } this . value = IPv4Address . IPv4Factory ( s ) ; if ( value == null ) { if ( log . isDebugEnabled ( ) ) { log . debug ( "not a valid IP: " + hostAddress ) ; } throw new UnknownHostException ( "not a valid IP: " + hostAddress ) ; } if ( log . isDebugEnabled ( ) ) { log . debug ( value ) ; log . debug ( byteLength ( ) ) ; log . debug ( BytesUtil . toString ( value . getBytes ( ) ) ) ; } } else { if ( log . isDebugEnabled ( ) ) { log . debug ( "not a valid IP: " + hostAddress ) ; } throw new UnknownHostException ( "Did not match REGEX - not a valid IP: " + hostAddress ) ; } }
ctor with host address specified .
