Package net.codecrete.qrbill.generator
Class QRCodeText
- java.lang.Object
-
- net.codecrete.qrbill.generator.QRCodeText
-
public class QRCodeText extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.Stringcreate(Bill bill)Gets the text embedded in the QR code (according to the data structure defined by SIX)static Billdecode(java.lang.String text)Decodes the specified text and returns the bill data.
-
-
-
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
-
-