public static int indexOf0(final byte[] src, final int start, final String message) throws ImagingException {
        final int i = ArrayUtils.indexOf(src, NUL, start);
        if (i < 0) {
            throw new ImagingException(message);
        }
        return i;
    }
Finds the index of the first 0 in the array starting at the given index.

@param src  the array to search for the object, may be {@code null}
@param start  the index to start searching at
@param message The ImagingException message if 0 is not found.
@return the index of the value within the array,
@throws ImagingException Thrown if 0 is not found.
src/main/java/org/apache/commons/imaging/common/BinaryFunctions.java