/**
* 从网络字节流中读取4个字节拼装,返回long
*
* @param from
* @param fromIndex
* @return
*/
public static long getLongData(byte[] from, int fromIndex) {
if (from == null) {
return 0;
}
return (((long) from[fromIndex] & 0xff) << 24)
+ (((long) from[fromIndex + 1] & 0xff) << 16)
+ (((long) from[fromIndex + 2] & 0xff) << 8)
+ (((long) from[fromIndex + 3] & 0xff) << 0);
}