Class NumericFormatBinary

java.lang.Object
Direct Known Subclasses:
TandemNative

public class NumericFormatBinary extends NumericFormatCompressed
Provides a formatter that emulates COBOL's NumericFormatBinary (COMP) functionality in Java. Given a decimal value and specified total digit count, this class:
1) encodes the value as a two's-complement binary integer using the minimum byte length
2) decodes the binary representation back into numeric values, preserving sign and magnitude
3) enforces correct byte ordering and length based on digit count
4) handles overflow when the value exceeds the representable range
This implementation delivers an efficient, high-performance Java equivalent of COBOL's binary numeric format for mission-critical data-conversion workflows.