package android.bluetooth; | |
import com.google.protobuf.ByteString; | |
public final class Utils { | |
public static String addressStringFromByteString(ByteString bs) { | |
StringBuilder refAddrBuilder = new StringBuilder(); | |
for (int i = 0; i < bs.size(); i++) { | |
if (i != 0) { | |
refAddrBuilder.append(':'); | |
} | |
refAddrBuilder.append(String.format("%02X", bs.byteAt(i))); | |
} | |
return refAddrBuilder.toString(); | |
} | |
} |