docs: @Override
      protected void encode() {
          int l = content.length();
          String localstr;
          int zeroes, count = 0, check_digit;
          Code3Of9 c = new Code3Of9();
  
          if (l > 7) {
              throw new OkapiException("Input data too long");
          }
  
          if (!content.matches("[0-9]+")) {
              throw new OkapiException("Invalid characters in input");
          }
  
          localstr = "-";
          zeroes = 7 - l + 1;
          for (int i = 1; i < zeroes; i++)
              localstr += '0';
  
          localstr += content;
  
          for (int i = 1; i < 8; i++) {
              count += i * Character.getNumericValue(localstr.charAt(i));
          }
  
          check_digit = count % 11;
          if (check_digit == 11) {
              check_digit = 0;
          }
          if (check_digit == 10) {
              throw new OkapiException("Not a valid PZN identifier");
          }
  
          encodeInfo += "Check Digit: " + check_digit + "\n";
  
          localstr += (char)(check_digit + '0');
  
          c.setContent(localstr);
  
          readable = "PZN" + localstr;
          pattern = new String[1];
          pattern[0] = c.pattern[0];
          row_count = 1;
          row_height = new int[1];
          row_height[0] = -1;
      }