io.undertow.util

## Class NetworkUtils

- java.lang.Object
- - io.undertow.util.NetworkUtils

    public class NetworkUtils
    extends Object

Author:
  Stuart Douglas, baranowb

### Field Summary

Fields
`static String` `IP4_EXACT`
`static String` `IP6_EXACT` IPV6 match.

### Method Summary

All Methods Static Methods Concrete Methods
`static String` `formatPossibleIpv6Address(String address)`
`static InetAddress` `parseIpv4Address(String addressString)`
`static InetAddress` `parseIpv6Address(String addressString)`
`static byte[]` `parseIpv6AddressToBytes(String addressString)`
`static String` `toObfuscatedString(InetAddress address)`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### IP4_EXACT

    public static final String IP4_EXACT

See Also:
  Constant Field Values

#### IP6_EXACT

    public static final String IP6_EXACT

IPV6 match. ?: - unnamed groups are used for performance reasons. Requirements: - match full or partial IPV6 ( sliding '::') - match end to start - ^$ to ensure it does not match part of some random (\d:){n,m} - IPv4-Embedded IPv6 Address NO: - IPv4 mapped/translated into IPv6 ^(?:([0-9a-fA-F]{1,4}:){7,7}(?:[0-9a-fA-F]){1,4} - full address |(?:([0-9a-fA-F]{1,4}:)){1,7}(?:(:)) - last compressed |(?:([0-9a-fA-F]{1,4}:)){1,6}(?:(:[0-9a-fA-F]){1,4}) - second to last |(?:([0-9a-fA-F]{1,4}:)){1,5}(?:(:[0-9a-fA-F]{1,4})){1,2} - etc |(?:([0-9a-fA-F]{1,4}:)){1,4}(?:(:[0-9a-fA-F]{1,4})){1,3} |(?:([0-9a-fA-F]{1,4}:)){1,3}(?:(:[0-9a-fA-F]{1,4})){1,4} |(?:([0-9a-fA-F]{1,4}:)){1,2}(?:(:[0-9a-fA-F]{1,4})){1,5} |(?:([0-9a-fA-F]{1,4}:))(?:(:[0-9a-fA-F]{1,4})){1,6} |(?:(:))(?:((:[0-9a-fA-F]{1,4}){1,7}|(?:(:)))))$ - all the way compressed

See Also:
  Constant Field Values

### Method Detail

#### formatPossibleIpv6Address

    public static String formatPossibleIpv6Address(String address)

#### parseIpv4Address

    public static InetAddress parseIpv4Address(String addressString)
                                        throws IOException

Throws:
  `IOException`

#### parseIpv6Address

    public static InetAddress parseIpv6Address(String addressString)
                                        throws IOException

Throws:
  `IOException`

#### parseIpv6AddressToBytes

    public static byte[] parseIpv6AddressToBytes(String addressString)
                                          throws IOException

Throws:
  `IOException`

#### toObfuscatedString

    public static String toObfuscatedString(InetAddress address)