浏览 3412 次
锁定老帖子 主题:int[]转换成 byte[]
该帖已经被评为新手帖
|
|
---|---|
作者 | 正文 |
发表时间:2007-09-05
int []pHikHeader=new int[]{0x34,0x48,0x4B,0x48,0xFE,0xB3,0xD0,0xD6,0x08,0x03,0x04,0x20,0x00,0x00,0x00,0x00,0x03,0x10,0x01,0x10,0x01,0x10,0x10,0x00,0x80,0x3E,0x00,0x00,0x60,0x01,0x20,0x01,0x11,0x10,0x00,0x00,0x0E,0x00,0x00,0x00};
声明:ITeye文章版权属于作者,受法律保护。没有作者书面许可不得转载。
推荐链接
|
|
返回顶楼 | |
发表时间:2007-09-05
byte []pHikHeader=new byte[]{0x34,0x48,0x4B,0x48,0xFE,0xB3,0xD0,0xD6,0x08,0x03,0x04,0x20,0x00,0x00,0x00,0x00,0x03,0x10,0x01,0x10,0x01,0x10,0x10,0x00,0x80,0x3E,0x00,0x00,0x60,0x01,0x20,0x01,0x11,0x10,0x00,0x00,0x0E,0x00,0x00,0x00};
// 为什么这个声明会报错呢? 0xFE possible loss of precision,这里面值都是在byte范围内,没越过255. |
|
返回顶楼 | |
发表时间:2007-09-05
byte 的范围应该是-128~127吧.
|
|
返回顶楼 | |