MCPcopy Create free account
hub / github.com/antlr/codebuff / getInet4Address

Method getInet4Address

output/java_guava/1.4.19/InetAddresses.java:124–132  ·  view source on GitHub ↗

Returns an Inet4Address, given a byte array representation of the IPv4 address. @param bytes byte array representing an IPv4 address (should be of length 4) @return Inet4Address corresponding to the supplied byte array @throws IllegalArgumentException if a valid Inet4Address

(byte[] bytes)

Source from the content-addressed store, hash-verified

122 */
123
124 private static Inet4Address getInet4Address(byte[] bytes) {
125 Preconditions.checkArgument(
126 bytes.length == 4,
127 "Byte array has invalid length for an IPv4 address: %s != 4.",
128 bytes.length);
129
130 // Given a 4-byte array, this cast should always succeed.
131 return (Inet4Address) bytesToInetAddress(bytes);
132 }
133
134 /**
135 * Returns the {@link InetAddress} having the given string representation.

Callers 6

getCompatIPv4AddressMethod · 0.95
get6to4IPv4AddressMethod · 0.95
getTeredoInfoMethod · 0.95
getIsatapIPv4AddressMethod · 0.95
getCoercedIPv4AddressMethod · 0.95
fromIntegerMethod · 0.95

Calls 2

checkArgumentMethod · 0.95
bytesToInetAddressMethod · 0.95

Tested by

no test coverage detected