33ab53f520
* UOCL-265: Spanish translation improvements * UOCL-246: Reprint receipt fix * UOCL-246: Reprint receipt fix * UOCL-246: reprint receipt * UOCL-283: Porting ZATCA QR-code! * UOCL-283: Porting ZATCA QR-code! * UOCL-246: reprint receipt * UOCL-274: Top 10 sales rpt fix * UOCL-274: Top 10 sales rpt fix * 5.3.1 release
41 lines
748 B
Java
41 lines
748 B
Java
package com.unicenta.pos.util;
|
|
|
|
import java.nio.charset.StandardCharsets;
|
|
|
|
public class QRObject {
|
|
|
|
private int tag;
|
|
private int length;
|
|
private String value;
|
|
|
|
public QRObject(int tag, String value) {
|
|
this.tag = tag;
|
|
this.length = setLength(value);
|
|
this.value = value;
|
|
}
|
|
|
|
public int getTag() {
|
|
return tag;
|
|
}
|
|
|
|
public void setTag(int tag) {
|
|
this.tag = tag;
|
|
}
|
|
|
|
public String getValue() {
|
|
return value;
|
|
}
|
|
|
|
public void setValue(String value) {
|
|
this.value = value;
|
|
}
|
|
|
|
public int getLength() {
|
|
return length;
|
|
}
|
|
|
|
private static int setLength(String value) {
|
|
return value.getBytes(StandardCharsets.UTF_8).length;
|
|
}
|
|
}
|