Class QRCodeText


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String create​(Bill bill)
      Gets the text embedded in the QR code (according to the data structure defined by SIX)
      static Bill decode​(java.lang.String text)
      Decodes the specified text and returns the bill data.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • create

        public static java.lang.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​(java.lang.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