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');
}
}