C# 클래스 zxingwp7.qrcode.encoder.Encoder

파일 보기 프로젝트 열기: henningms/zxing2.0-wp7

공개 메소드들

메소드 설명
chooseMode ( String content ) : Mode
chooseMode ( String content, String encoding ) : Mode

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, ErrorCorrectionLevel ecLevel, Object>.Dictionary hints, QRCode qrCode ) : void
encode ( String content, ErrorCorrectionLevel ecLevel, QRCode qrCode ) : void

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.

비공개 메소드들

메소드 설명
Encoder ( ) : System
append8BitBytes ( String content, BitVector bits, String encoding ) : void
appendAlphanumericBytes ( String content, BitVector bits ) : void
appendBytes ( String content, Mode mode, BitVector bits, String encoding ) : void

Append "bytes" in "mode" mode (encoding) into "bits". On success, store the result in "bits".

appendECI ( CharacterSetECI eci, BitVector bits ) : void
appendKanjiBytes ( String content, BitVector bits ) : void
appendLengthInfo ( int numLetters, int version, Mode mode, BitVector bits ) : void

Append length info. On success, store the result in "bits".

appendModeInfo ( Mode mode, BitVector bits ) : void

Append mode info. On success, store the result in "bits".

appendNumericBytes ( String content, BitVector bits ) : void
calculateMaskPenalty ( ByteMatrix matrix ) : int
chooseMaskPattern ( BitVector bits, ErrorCorrectionLevel ecLevel, int version, ByteMatrix matrix ) : int
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, ErrorCorrectionLevel ecLevel, Mode mode, QRCode qrCode ) : void

Initialize "qrCode" according to "numInputBytes", "ecLevel", and "mode". On success, modify "qrCode".

interleaveWithECBytes ( BitVector bits, int numTotalBytes, int numDataBytes, int numRSBlocks, BitVector result ) : void

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, BitVector bits ) : void

Terminate bits as described in 8.4.8 and 8.4.9 of JISX0510:2004 (p.24).

메소드 상세

chooseMode() 공개 정적인 메소드

public static chooseMode ( String content ) : Mode
content String
리턴 zxingwp7.qrcode.decoder.Mode

chooseMode() 공개 정적인 메소드

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}.
public static chooseMode ( String content, String encoding ) : Mode
content String
encoding String
리턴 zxingwp7.qrcode.decoder.Mode

encode() 공개 정적인 메소드

public static encode ( String content, ErrorCorrectionLevel ecLevel, Object>.Dictionary hints, QRCode qrCode ) : void
content String
ecLevel zxingwp7.qrcode.decoder.ErrorCorrectionLevel
hints Object>.Dictionary
qrCode QRCode
리턴 void

encode() 공개 정적인 메소드

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.
public static encode ( String content, ErrorCorrectionLevel ecLevel, QRCode qrCode ) : void
content String
ecLevel zxingwp7.qrcode.decoder.ErrorCorrectionLevel
qrCode QRCode
리턴 void