Java byte转int
public static int bytesToInt(byte[] bytes,int offset){ int i = (int) (((bytes[offset] & 0xFF)<<24) |((bytes[offset+1] & 0xFF)<<16) |((bytes[offset+2] & 0xFF)<<8) |(bytes[offset+3]