private static void checkByteArgument(byte[] value, int startIndex, int bytesRequired) throws IOException {
        if (value == null) {
            throw new IOException("value must be non-null");
        }

        if (startIndex < 0) {
            throw new IOException("The index cannot be less than 0.");
        }

        if (startIndex > value.length - bytesRequired) {
            throw new IOException(
                    "startIndex " + startIndex + " is less than value.length (" + value.length +
                            ") minus bytesRequired (" + bytesRequired + ")");
        }
    }
This method is used to check the given argument for validity.

@param value         Specify the byte array.
@param startIndex    Specify the start index.
@param bytesRequired Specify the number of bytes.
tika-parsers/tika-parsers-standard/tika-parsers-standard-modules/tika-parser-microsoft-module/src/main/java/org/apache/tika/parser/microsoft/onenote/fsshttpb/util/LittleEndianBitConverter.java