docs: static StringBuilder escapeBytes(ByteBuffer input)
      {
          // input.flip();
          int length = input.limit();
          final StringBuilder builder = new StringBuilder(length);
          for (int i = 0; i < length; i++)
          {
              final byte b = input.get(i);
              switch (b)
              {
              // Java does not recognize \a or \v, apparently.
                  case 0x07:
                      builder.append("\\007");
                      break;
                  case '\b':
                      builder.append("\\b");
                      break;
                  case '\f':
                      builder.append("\\f");
                      break;
                  case '\n':
                      builder.append("\\n");
                      break;
                  case '\r':
                      builder.append("\\r");
                      break;
                  case '\t':
                      builder.append("\\t");
                      break;
                  case 0x0b:
                      builder.append("\\013");
                      break;
                  case '\\':
                      builder.append("\\\\");
                      break;
                  case '\'':
                      builder.append("\\\'");
                      break;
                  case '"':
                      builder.append("\\\"");
                      break;
                  default:
                      if (b >= 0x20)
                      {
                          builder.append((char) b);
                      }
                      else
                      {
                          builder.append('\\');
                          builder.append((char) ('0' + ((b >>> 6) & 3)));
                          builder.append((char) ('0' + ((b >>> 3) & 7)));
                          builder.append((char) ('0' + (b & 7)));
                      }
                      break;
              }
          }
          return builder;
      }