diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2021-05-12 14:15:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-12 14:15:18 +0200 |
commit | 18ba6785f9c8f271c0886496e6b8ed7cd0005333 (patch) | |
tree | 3aaf04d2c909fda779e173edad48923b552c13fd /src/main/java/org/uic/barcode/Encoder.java | |
parent | Merge pull request #22 from irrationalism/feature/restructure-pom (diff) | |
parent | Merge branch 'master' into asn1_comments_1 (diff) | |
download | UIC-barcode-1.2.5.tar UIC-barcode-1.2.5.tar.gz UIC-barcode-1.2.5.tar.bz2 UIC-barcode-1.2.5.tar.lz UIC-barcode-1.2.5.tar.xz UIC-barcode-1.2.5.tar.zst UIC-barcode-1.2.5.zip |
Diffstat (limited to 'src/main/java/org/uic/barcode/Encoder.java')
-rw-r--r-- | src/main/java/org/uic/barcode/Encoder.java | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/main/java/org/uic/barcode/Encoder.java b/src/main/java/org/uic/barcode/Encoder.java index aafe5cc..d971214 100644 --- a/src/main/java/org/uic/barcode/Encoder.java +++ b/src/main/java/org/uic/barcode/Encoder.java @@ -5,6 +5,7 @@ import java.security.PrivateKey; import java.security.PublicKey;
import org.uic.barcode.asn1.datatypesimpl.OctetString;
+import org.uic.barcode.dynamicContent.fdc1.UicDynamicContentDataFDC1;
import org.uic.barcode.dynamicFrame.Constants;
import org.uic.barcode.dynamicFrame.DataType;
import org.uic.barcode.dynamicFrame.DynamicFrame;
@@ -165,6 +166,15 @@ public class Encoder { }
}
+ public void setDynamicContentDataUIC1(UicDynamicContentDataFDC1 dcd) {
+ if (dynamicFrame != null) {
+ if (dynamicFrame.getLevel2SignedData() == null) {
+ dynamicFrame.setLevel2SignedData(new Level2DataType());
+ }
+ dynamicFrame.getLevel2SignedData().setLevel2Data(dcd.getDataType());
+ }
+ }
+
public DataType getLevel2Data() {
if (dynamicFrame != null && dynamicFrame.getLevel2SignedData() != null) {
return dynamicFrame.getLevel2SignedData().getLevel2Data();
@@ -172,6 +182,14 @@ public class Encoder { return null;
}
+ public UicDynamicContentDataFDC1 getDynamicContentDataUIC1() {
+ if (dynamicFrame != null && dynamicFrame.getLevel2SignedData() != null) {
+ return dynamicFrame.getDynamicDataFDC1();
+ }
+ return null;
+ }
+
+
/**
* Sign level 1 of a dynamic bar code or a static bar code.
*
|