Méthode | Description | |
---|---|---|
chooseMode ( String content ) : |
Chooses the mode.
|
|
encode ( String content, |
Encode "bytes" with the error correction level "ecLevel". The encoding mode will be chosen internally by chooseMode(). On success, store the result in "qrCode". We recommend you to use QRCode.EC_LEVEL_L (the lowest level) for "getECLevel" since our primary use is to show QR code on desktop screens. We don't need very strong error correction for this purpose. Note that there is no way to encode bytes in MODE_KANJI. We might want to add EncodeWithMode() with which clients can specify the encoding mode. For now, we don't need the functionality.
|
|
encode ( String content, |
Encodes the specified content.
|
Méthode | Description | |
---|---|---|
append8BitBytes ( String content, BitArray bits, String encoding ) : void | ||
appendAlphanumericBytes ( String content, BitArray bits ) : void | ||
appendBytes ( String content, |
Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
|
|
appendECI ( |
||
appendKanjiBytes ( String content, BitArray bits ) : void | ||
appendLengthInfo ( int numLetters, Version version, |
Append length info. On success, store the result in "bits".
|
|
appendModeInfo ( |
Append mode info. On success, store the result in "bits".
|
|
appendNumericBytes ( String content, BitArray bits ) : void | ||
calculateMaskPenalty ( ByteMatrix matrix ) : int | ||
chooseMaskPattern ( BitArray bits, |
||
chooseMode ( String content, String encoding ) : |
Choose the best mode by examining the content. Note that 'encoding' is used as a hint; if it is Shift_JIS, and the input is only double-byte Kanji, then we return {@link Mode#KANJI}.
|
|
chooseVersion ( int numInputBits, |
||
generateECBytes ( byte dataBytes, int numEcBytesInBlock ) : byte[] | ||
getAlphanumericCode ( int code ) : int |
Gets the alphanumeric code.
|
|
getNumDataBytesAndNumECBytesForBlockID ( int numTotalBytes, int numDataBytes, int numRSBlocks, int blockID, int numDataBytesInBlock, int numECBytesInBlock ) : void |
Get number of data bytes and number of error correction bytes for block id "blockID". Store the result in "numDataBytesInBlock", and "numECBytesInBlock". See table 12 in 8.5.1 of JISX0510:2004 (p.30)
|
|
interleaveWithECBytes ( BitArray bits, int numTotalBytes, int numDataBytes, int numRSBlocks ) : BitArray |
Interleave "bits" with corresponding error correction bytes. On success, store the result in "result". The interleave rule is complicated. See 8.6 of JISX0510:2004 (p.37) for details.
|
|
isOnlyDoubleByteKanji ( String content ) : bool | ||
terminateBits ( int numDataBytes, BitArray bits ) : void |
Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).
|
public static chooseMode ( String content ) : |
||
content | String | The content. |
Résultat |
public static encode ( String content, |
||
content | String | text to encode |
ecLevel | error correction level to use | |
Résultat |
public static encode ( String content, |
||
content | String | The content. |
ecLevel | The ec level. | |
hints | object>.IDictionary | The hints. |
Résultat |