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

ruby - When to use an ORM (Sequel, Datamapper, AR, etc.) vs. pure SQL for querying -

php - PHPDoc: @return void necessary? -

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