class Utils {

    public static void validateArrayAllegedSize(byte[] data, int offset, int allegedSize) {
        if (data.length < Math.addExact(allegedSize, offset)) {
            throw new IllegalArgumentException("The specified size exceeds the size of the payload");
        }
    }

}