List of usage examples for com.google.common.primitives UnsignedBytes toString
@Beta @CheckReturnValue public static String toString(byte x)
From source file:org.opendaylight.openflowplugin.extension.vendor.nicira.convertor.match.MatchUtil.java
public static Ipv4Address longToIpv4Address(Long l) { byte[] bytes = Longs.toByteArray(l); String[] strArray = new String[4]; for (int i = 4; i < bytes.length; i++) { strArray[i - 4] = UnsignedBytes.toString(bytes[i]); }/*from ww w .j a va 2 s.c om*/ String str = JOINER.join(strArray); Ipv4Address result = new Ipv4Address(str); return result; }