Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Finds and returns the relative index of the first mismatch between this buffer and a given buffer.
[Android.Runtime.Register("mismatch", "(Ljava/nio/ByteBuffer;)I", "GetMismatch_Ljava_nio_ByteBuffer_Handler", ApiSince=34)]
public virtual int Mismatch(Java.Nio.ByteBuffer that);
[<Android.Runtime.Register("mismatch", "(Ljava/nio/ByteBuffer;)I", "GetMismatch_Ljava_nio_ByteBuffer_Handler", ApiSince=34)>]
abstract member Mismatch : Java.Nio.ByteBuffer -> int
override this.Mismatch : Java.Nio.ByteBuffer -> int
The byte buffer to be tested for a mismatch with this buffer
The relative index of the first mismatch between this and the given buffer, otherwise -1 if no mismatch.
Finds and returns the relative index of the first mismatch between this buffer and a given buffer. The index is relative to the #position() position
of each buffer and will be in the range of 0 (inclusive) up to the smaller of the #remaining() remaining
elements in each buffer (exclusive).
If the two buffers share a common prefix then the returned index is the length of the common prefix and it follows that there is a mismatch between the two buffers at that index within the respective buffers. If one buffer is a proper prefix of the other then the returned index is the smaller of the remaining elements in each buffer, and it follows that the index is only valid for the buffer with the larger number of remaining elements. Otherwise, there is no mismatch.
Added in 11.
Java documentation for java.nio.ByteBuffer.mismatch(java.nio.ByteBuffer)
.
Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.
Product | Versions |
---|---|
.NET for Android | .NET for Android API 34, .NET for Android API 35, .NET for Android API 36 |
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in