com.solab.iso8583.parse.BcdLengthLlbinParseInfo Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of j8583 Show documentation
Show all versions of j8583 Show documentation
Java implementation of the ISO 8583 protocol, focused on making the creation, edition and reading of ISO8583 messages as simple and flexible as possible.
package com.solab.iso8583.parse;
import com.solab.iso8583.IsoType;
/**
* Custom class to parse fields of type LLBCDBIN with BCD length.
*/
public class BcdLengthLlbinParseInfo extends LlbinParseInfo {
public BcdLengthLlbinParseInfo() {
super(IsoType.LLBCDBIN, 0);
}
@Override
protected int getLengthForBinaryParsing(byte b) {
final int length = super.getLengthForBinaryParsing(b);
return length % 2 == 0 ? length / 2 : (length / 2) + 1;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy