Class Format

java.lang.Object
com.softwaremining.wrappers.format.Format
Direct Known Subclasses:
AbstractNumericFormat, AlphaNumericFormat

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