I have a declaration as List<List<byte[]>>
, i.e. inner list is list of byte arrays and there are N such lists. I want to identify common byte arrays across all the lists. How would I do that? There is a discussion here, but I donot know if it works for byte arrays
Asked
Active
Viewed 56 times
-2

mobileDev
- 1,358
- 2
- 14
- 34
-
Why don't you check first it's working or not? – Eklavya Jul 26 '20 at 06:57
2 Answers
0
Use the solution you've linked, but as arrays don't have hashCode
overriden, you have to wrap them in ByteBuffer
, using ByteBuffer.wrap
. To extract the array from a ByteBuffer
, call array
on it.

Andrew Vershinin
- 1,958
- 11
- 16