mismatch

protected fun mismatch(data: ByteArray?, minLength: Int, prefix: ByteArray): Boolean

Performs an evaluation for non validity about a frame pattern recognition.

The mismatching is declared as soon as one of these conditions about data is noticed:

  • It is null.

  • Its contents is below a minimal size.

  • It doesn't begin with prefix.

A negative approach is preferred in order to cleanly decline the frame with a very first test in IExplorerPlugin.explore.

Parameters

data

The data to evaluate.

minLength

The expected minimum length of data.

prefix

The expected beginning of data.