public static String toStringBinary(final byte [] b, int off, int len) {
    StringBuilder result = new StringBuilder();
    String first = new String(b, off, len, StandardCharsets.ISO_8859_1);
    for (int i = 0; i < first.length() ; ++i ) {
      int ch = first.charAt(i) & 0xFF;
      if ( (ch >= '0' && ch <= '9')
          || (ch >= 'A' && ch <= 'Z')
          || (ch >= 'a' && ch <= 'z')
          || " `~!@#$%^&*()-_=+[]{}\\|;:'\",.<>/?".indexOf(ch) >= 0 ) {
        result.append(first.charAt(i));
      } else {
        result.append(String.format("\\x%02X", ch));
      }
    }
    return result.toString();
  }
Outputs some bytes as hex w/printable characters prints.
Helpful debug method; c/p from HBase Bytes.
@param b Bytes.
@param off Offset.
@param len Length.
@return The string representation.
ql/src/java/org/apache/hadoop/hive/ql/debug/Utils.java