Here you can find the source of formatFriendlyName(final byte[] addressBytes)
public static String formatFriendlyName(final byte[] addressBytes)
//package com.java2s; import javax.xml.bind.DatatypeConverter; public class Main { public static String formatFriendlyName(final byte[] addressBytes) { final String base64 = DatatypeConverter.printBase64Binary(addressBytes); final String slashToMinus = base64.replace('/', '-'); return slashToMinus; }/*from w w w.j a v a 2 s . c o m*/ }