/** * Checks if the length of the string plus 1 for terminating zero * is less or equal than provided maximum. * * @param string the string to check * @param max the maximal length of the string with added term. zero * @exception WrongLengthOfStringException thrown if string with added * terminating zero would be longer than the maximum */ protected static void checkCString(String string, int max) throws WrongLengthOfStringException { checkCString(string, 1, max); // min = empty + 1 for zero }