code: public static String byteArray2String(final byte[] array, final String prefix, final String delimiter, final boolean brackets, final int radix) {
      if (array == null) {
        return null;
      }
  
      final int maxlen = Integer.toString(0xFF, radix).length();
      final String zero = "00000000";
  
      final String normDelim = delimiter == null ? " " : delimiter;
      final String normPrefix = prefix == null ? "" : prefix;
  
      final StringBuilder result = new StringBuilder(array.length * 4);
  
      if (brackets) {
        result.append('[');
      }
  
      boolean nofirst = false;
  
      for (final byte b : array) {
        if (nofirst) {
          result.append(normDelim);
        } else {
          nofirst = true;
        }
  
        result.append(normPrefix);
  
        final String v = Integer.toString(b & 0xFF, radix);
        if (v.length() < maxlen) {
          result.append(zero, 0, maxlen - v.length());
        }
        result.append(v.toUpperCase(Locale.ENGLISH));
      }
  
      if (brackets) {
        result.append(']');
      }
  
      return result.toString();
    }
docs: Convert a byte array into string representation
  
  @param array     the array to be converted, it must not be null
  @param prefix    the prefix for each converted value, it can be null
  @param delimiter the delimeter for string representations
  @param brackets  if true then place the result into square brackets
  @param radix     the base for conversion
  @return the string representation of the byte array