Compare two Byte Arrays? (Java)

前端 未结 6 1226
天涯浪人
天涯浪人 2020-12-08 01:46

I have a byte array with a ~known binary sequence in it. I need to confirm that the binary sequence is what it\'s supposed to be. I have tried .equals in additi

6条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-08 02:16

    Check out the static java.util.Arrays.equals() family of methods. There's one that does exactly what you want.

提交回复
热议问题