docs: @Override
      protected void encode() {
  
          if (!content.matches("[0-9-]+")) {
              throw new OkapiException("Invalid characters in input");
          }
  
          String horizontalSpacing = "112211";
          String humanReadable = content;
          int length = content.length();
          int[] weight = new int[length + 1];
  
          for (int i = 0; i < length; i++) {
              char c = content.charAt(i);
              weight[i] = positionOf(c, CHARACTER_SET);
              horizontalSpacing += CODE_11_TABLE[weight[i]];
          }
  
          int checkDigitC = getCheckDigitC(weight, length);
          horizontalSpacing += CODE_11_TABLE[checkDigitC];
          humanReadable += CHARACTER_SET[checkDigitC];
          encodeInfo += "Check Digit C: " + checkDigitC + "\n";
  
          if (checkDigitCount == 2) {
              weight[length] = checkDigitC;
              int checkDigitK = getCheckDigitK(weight, length + 1);
              horizontalSpacing += CODE_11_TABLE[checkDigitK];
              humanReadable += CHARACTER_SET[checkDigitK];
              encodeInfo += "Check Digit K: " + checkDigitK + "\n";
          }
  
          horizontalSpacing += "112211";
  
          readable = humanReadable;
          if (startDelimiter != null) {
              readable = startDelimiter + readable;
          }
          if (stopDelimiter != null) {
              readable = readable + stopDelimiter;
          }
  
          pattern = new String[] { horizontalSpacing };
          row_count = 1;
          row_height = new int[] { -1 };
      }