【发布时间】:2012-08-02 23:00:58
【问题描述】:
我有以下几点:
int num=Integer.parseInt(lineArray[0]);
byte numBit= num & 0xFF;
有什么非常简单的方法可以将numBit 转换为位数组?或者更好的是,有没有办法绕过int的字节转换,直接从num变成位数组?
谢谢
【问题讨论】:
-
我想这也适用于你的情况...... [Stackoverflow - Bitset to and from Integer Long][1] [1]: stackoverflow.com/questions/2473597/…
-
你的意思是
boolean[]还是BitSet?
标签: java type-conversion bitarray