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

Method getInet4Address

output/java_guava/1.4.18/InetAddresses.java:124–131  ·  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(bytes.length == 4,
126 "Byte array has invalid length for an IPv4 address: %s != 4.",
127 bytes.length);
128
129 // Given a 4-byte array, this cast should always succeed.
130 return (Inet4Address) bytesToInetAddress(bytes);
131 }
132
133 /**
134 * 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