code: public static String toHex(byte b) {
        StringBuilder sb = new StringBuilder();
        appendByteAsHex(sb, b);
        return sb.toString();
     }
docs: Encodes a single byte to hex symbols.
  
  @param b the byte to encode
  @return the resulting hex string