开发者

bitwise operation class in Java

开发者 https://www.devze.com 2023-02-03 07:22 出处:网络
is there a class that makes bitwise operation easier ? I need some methods that reads into开发者_如何学JAVA integer the \"value\" of bits givem their offset and length (in a 32/64 bits byte array).

is there a class that makes bitwise operation easier ? I need some methods that reads into开发者_如何学JAVA integer the "value" of bits givem their offset and length (in a 32/64 bits byte array).

I can use the bit manipulations available with java but I rather use a debugged class.


Take a look at BitSet. And here is a usage example that looks like it demonstrates code similar to what you need to do.


Try java.util.BitSet or java.math.BigInteger.

0

精彩评论

暂无评论...
验证码 换一张
取 消