java - compare ByteBuffer contents? -


what's easiest way in java compare contents of 2 bytebuffers check equality?

you check equals() method too.

tells whether or not buffer equal object.

two byte buffers equal if, , if,

  1. they have same element type,
  2. they have same number of remaining elements, ,
  3. the 2 sequences of remaining elements, considered independently of starting positions, pointwise equal.

a byte buffer not equal other type of object.


Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -