/** * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". */ static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException { if (mode.equals(Mode.NUMERIC)) { appendNumericBytes(content, bits); } else if (mode.equals(Mode.ALPHANUMERIC)) { appendAlphanumericBytes(content, bits); } else if (mode.equals(Mode.BYTE)) { append8BitBytes(content, bits, encoding); } else if (mode.equals(Mode.KANJI)) { appendKanjiBytes(content, bits); } else { throw new WriterException("Invalid mode: " + mode); } }
/** * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". */ static void appendBytes(String content, Mode mode, BitArray bits, String encoding) throws WriterException { if (mode.equals(Mode.NUMERIC)) { appendNumericBytes(content, bits); } else if (mode.equals(Mode.ALPHANUMERIC)) { appendAlphanumericBytes(content, bits); } else if (mode.equals(Mode.BYTE)) { append8BitBytes(content, bits, encoding); } else if (mode.equals(Mode.KANJI)) { appendKanjiBytes(content, bits); } else { throw new WriterException("Invalid mode: " + mode); } }
/** * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". */ 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); } }
/** * Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits". */ 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); } }