Méthode | Description | |
---|---|---|
chooseMode ( String content ) : |
||
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}.
|
|
encode ( String content, |
||
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.
|
Méthode | Description | |
---|---|---|
Encoder ( ) : System | ||
append8BitBytes ( String content, |
||
appendAlphanumericBytes ( String content, |
||
appendBytes ( String content, |
Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".
|
|
appendECI ( CharacterSetECI eci, |
||
appendKanjiBytes ( String content, |
||
appendLengthInfo ( int numLetters, int 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, |
||
calculateMaskPenalty ( |
||
chooseMaskPattern ( |
||
generateECBytes ( ByteArray dataBytes, int numEcBytesInBlock ) : ByteArray | ||
getAlphanumericCode ( int code ) : int | ||
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)
|
|
initQRCode ( int numInputBytes, |
Initialize "qrCode" according to "numInputBytes", "ecLevel", and "mode". On success, modify "qrCode".
|
|
interleaveWithECBytes ( |
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, |
Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).
|
public static chooseMode ( String content ) : |
||
content | String | |
Résultat |
public static chooseMode ( String content, String encoding ) : |
||
content | String | |
encoding | String | |
Résultat |
public static encode ( String content, |
||
content | String | |
ecLevel | ||
hints | Object>.Dictionary | |
qrCode | ||
Résultat | void |
public static encode ( String content, |
||
content | String | |
ecLevel | ||
qrCode | ||
Résultat | void |