public QrCodeEncoder addKanji ( String message ) { byte [ ] bytes ; try { bytes = message . getBytes ( "Shift_JIS" ) ; } catch ( UnsupportedEncodingException ex ) { throw new IllegalArgumentException ( ex ) ; } MessageSegment segment = new MessageSegment ( ) ; segment . message = message ; segment . data = bytes ; segment . length = message . length ( ) ; segment . mode = QrCode . Mode . KANJI ; segment . encodedSizeBits += 4 ; segment . encodedSizeBits += 13 * segment . length ; segments . add ( segment ) ; return this ; }
Creates a QR - Code which encodes Kanji characters