public static int calculateCheckDigits ( CharSequence input ) { if ( input == null || input . length ( ) < 5 || input . charAt ( 2 ) != ' ' || input . charAt ( 3 ) != ' ' ) { throw new IllegalArgumentException ( "The input must be non-null, have a minimum length of five characters, and the characters at indices 2 and 3 must be '0'." ) ; } return 98 - checksum ( input ) ; }
Calculates the check digits to be used in a MOD97 checked string .