com.google.zxing.qrcode.encoder
Class Encoder

java.lang.Object
  extended by com.google.zxing.qrcode.encoder.Encoder

public final class Encoder
extends Object

Since:
BlackBerry API 6.0.0

Method Summary
static Mode chooseMode(String content)
           
static Mode chooseMode(String content, String encoding)
          Choose the best mode by examining the content.
static void encode(String content, ErrorCorrectionLevel ecLevel, QRCode qrCode)
          Encode "bytes" with the error correction level "ecLevel".
static void encode(String content, ErrorCorrectionLevel ecLevel, Hashtable hints, QRCode qrCode)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 



Method Detail

encode

public static void encode(String content,
                          ErrorCorrectionLevel ecLevel,
                          QRCode qrCode)
                   throws WriterException
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.

Throws:
WriterException
Since:
BlackBerry API 6.0.0

encode

public static void encode(String content,
                          ErrorCorrectionLevel ecLevel,
                          Hashtable hints,
                          QRCode qrCode)
                   throws WriterException
Throws:
WriterException
Since:
BlackBerry API 6.0.0

chooseMode

public static Mode chooseMode(String content)
Since:
BlackBerry API 6.0.0

chooseMode

public static Mode 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 Mode.KANJI.

Since:
BlackBerry API 6.0.0





Copyright 1999-2011 Research In Motion Limited. 295 Phillip Street, Waterloo, Ontario, Canada, N2L 3W8. All Rights Reserved.
Java is a trademark of Oracle America Inc. in the US and other countries.
Legal