code: static private StringBuilder formatTextData(StringBuilder buffer, byte[] data, int inOffset) {
          int offset = inOffset;
          int end = offset + 16;
          for (; offset < end; offset++) {
              if (offset >= data.length) {
                  buffer.append(" ");
                  continue;
              }
              if (Character.isLetterOrDigit(data[offset])) {
                  buffer.append((char) data[offset]);
              } else {
                  buffer.append('.');
              }
          }
          return buffer;
      }
docs: Format the next 16 bytes of the input data starting from the input offset
  as ASCII characters. Non-ASCII bytes will be printed as a period symbol.
  
  @param buffer
  @param data
  @param inOffset
  @return StringBuilder