Class QrSegment

java.lang.Object
eu.webtoolkit.jwt.thirdparty.qrcodegen.QrSegment

public final class QrSegment extends Object
A segment of character/binary/control data in a QR Code symbol. Instances of this class are immutable. The mid-level way to create a segment is to take the payload data and call a static factory function such as QrSegment::makeNumeric(). The low-level way to create a segment is to custom-make the bit buffer and call the QrSegment() constructor with appropriate values. This segment class imposes no length restrictions, but QR Codes have restrictions. Even in the most favorable conditions, a QR Code can only hold 7089 characters of data. Any segment longer than this is meaningless for the purpose of generating QR Codes.
  • Constructor Details

    • QrSegment

      public QrSegment(eu.webtoolkit.jwt.thirdparty.qrcodegen.QrSegment.Mode md, int numCh, List<Boolean> dt)
  • Method Details

    • makeBytes

      public static QrSegment makeBytes(List<Integer> data)
    • makeNumeric

      public static QrSegment makeNumeric(String digits)
    • makeAlphanumeric

      public static QrSegment makeAlphanumeric(String text)
    • makeSegments

      public static List<QrSegment> makeSegments(String text)
    • makeEci

      public static QrSegment makeEci(long assignVal)
    • isNumeric

      public static boolean isNumeric(String text)
    • isAlphanumeric

      public static boolean isAlphanumeric(String text)
    • getMode

      public eu.webtoolkit.jwt.thirdparty.qrcodegen.QrSegment.Mode getMode()
    • getNumChars

      public int getNumChars()
    • getData

      public List<Boolean> getData()
    • getTotalBits

      public static int getTotalBits(List<QrSegment> segs, int version)