public final class InetAddresses
extends java.lang.Object
| Modifier and Type | Method | Description |
|---|---|---|
static byte[] |
ipStringToBytes(java.lang.String ipString) |
Returns the
InetAddress.getAddress() having the given string representation or null if
unable to parse. |
@Nullable public static byte[] ipStringToBytes(java.lang.String ipString)
InetAddress.getAddress() having the given string representation or null if
unable to parse.
This deliberately avoids all nameservice lookups (e.g. no DNS).
This is the same as com.google.common.net.InetAddresses.ipStringToBytes(), except internally Splitter isn't used (as that would introduce more dependencies).
ipString - String containing an IPv4 or IPv6 string literal, e.g.
"192.168.0.1" or "2001:db8::1"Copyright © 2018 OpenZipkin. All rights reserved.