appendBytes static method
Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
Implementation
static void appendBytes(
String content,
Mode mode,
BitArray bits,
Encoding encoding,
) {
switch (mode) {
case Mode.numeric:
appendNumericBytes(content, bits);
break;
case Mode.alphanumeric:
appendAlphanumericBytes(content, bits);
break;
case Mode.byte:
append8BitBytes(content, bits, encoding);
break;
case Mode.kanji:
appendKanjiBytes(content, bits);
break;
default:
throw WriterException('Invalid mode: $mode');
}
}