deepHash code。与字节数组 [英] deepHashCode with byte array
问题描述
由于某些原因, Arrays.deepHash code()
不能字节工作[]
。< BR>
是否有任何其他同等?
For some reason, Arrays.deepHashCode()
cannot work with byte[]
.
Is there any other equivalent?
推荐答案
首先,没有必要深。这是一个原始的。你不需要深。
First off, no need for "Deep". It's a primitive. You don't need Deep.
只需使用<一个href=\"http://download.oracle.com/javase/6/docs/api/java/util/Arrays.html#hash$c$c%28byte%5B%5D%29\"><$c$c>Arrays.hash$c$c(byte[] yourArray)
编辑:为了澄清,深意味着钻研包含在数组中的对象。既然你正在处理一个原始的,你只需要使用原始值本身在计算中。这就是为什么没有一个方法,深基元左右旋转。
To clarify, Deep implies delving into the Objects contained within the array. Given that you are dealing with a primitive, you just need to use the primitive value itself in the calculation. That's why none of the Deep methods revolve around primitives.
这篇关于deepHash code。与字节数组的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!