diff options
author | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2023-03-10 16:49:58 +0100 |
---|---|---|
committer | CGantert345 <57003061+CGantert345@users.noreply.github.com> | 2023-03-10 16:49:58 +0100 |
commit | 7ec06722923d96d2e51300bafb44b920ca341d58 (patch) | |
tree | 3a3635f56092a4fe1d6c15d88872ea699fb97666 /src/main/java/org/uic/barcode/ssbFrame/SsbHeader.java | |
parent | ssb added to encoder and decoder (diff) | |
download | UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.tar UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.tar.gz UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.tar.bz2 UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.tar.lz UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.tar.xz UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.tar.zst UIC-barcode-7ec06722923d96d2e51300bafb44b920ca341d58.zip |
Diffstat (limited to '')
-rw-r--r-- | src/main/java/org/uic/barcode/ssbFrame/SsbHeader.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/java/org/uic/barcode/ssbFrame/SsbHeader.java b/src/main/java/org/uic/barcode/ssbFrame/SsbHeader.java index 0d5424b..2ea4a51 100644 --- a/src/main/java/org/uic/barcode/ssbFrame/SsbHeader.java +++ b/src/main/java/org/uic/barcode/ssbFrame/SsbHeader.java @@ -27,7 +27,7 @@ public class SsbHeader extends SsbTicketPart { public SsbHeader() { } - public void decodeContent(byte[] headerData) { + public int decodeContent(byte[] headerData, int offset) { BitBuffer bits = new ByteBitBuffer(headerData); @@ -36,11 +36,11 @@ public class SsbHeader extends SsbTicketPart { keyId = bits.getInteger(18, 4); ticketType = SsbTicketType.values()[bits.getInteger(22, 5)]; - return; + return 4 + 14 + 4 + 5; } - public void encodeContent(byte[] bytes) { + public int encodeContent(byte[] bytes, int offset) { BitBuffer bits = new ByteBitBuffer(bytes); @@ -49,6 +49,8 @@ public class SsbHeader extends SsbTicketPart { bits.putInteger(18, 4, keyId); bits.putInteger(22, 5, ticketType.ordinal()); + return 4 + 14 + 4 + 5; + } |