Class QRCodeText

java.lang.Object
net.codecrete.qrbill.generator.QRCodeText

public class QRCodeText extends Object
Internal class for encoding and decoding the text embedded in the QR code.
  • Method Details

    • create

      public static String create(Bill bill)
      Gets the text embedded in the QR code (according to the data structure defined by SIX)
      Parameters:
      bill - bill data
      Returns:
      QR code text
    • decode

      public static Bill decode(String text)
      Decodes the specified text and returns the bill data.

      The Text is assumed to be in the data structured for the QR code defined by SIX.

      The returned data is only minimally validated. The format and the header are checked. Amount and date must be parsable.

      Parameters:
      text - the text to decode
      Returns:
      the bill data
      Throws:
      QRBillValidationError - if a validation error occurs