code: static void appendBytes(String content,
                            Mode mode,
                            BitArray bits,
                            String encoding) throws WriterException {
      switch (mode) {
        case NUMERIC:
          appendNumericBytes(content, bits);
          break;
        case ALPHANUMERIC:
          appendAlphanumericBytes(content, bits);
          break;
        case BYTE:
          append8BitBytes(content, bits, encoding);
          break;
        case KANJI:
          appendKanjiBytes(content, bits);
          break;
        default:
          throw new WriterException("Invalid mode: " + mode);
      }
    }
docs: Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".