1. 2个字节数组转换为整数
1 def bytes2uint8(_bytes: Array[Byte], _offset: Int): Int = { 2 val b0 = _bytes(_offset) & 0xff 3 return b0 4 } 5 6 def bytes2sint8(_bytes: Array[Byte], _offset: Int): Int = { 7 val b0 = _bytes(_offset) 8 return b0 9 }
1. 2个字节数组转换为整数
1 def bytes2uint8(_bytes: Array[Byte], _offset: Int): Int = { 2 val b0 = _bytes(_offset) & 0xff 3 return b0 4 } 5 6 def bytes2sint8(_bytes: Array[Byte], _offset: Int): Int = { 7 val b0 = _bytes(_offset) 8 return b0 9 }
相关文章: