/**
* 从网络字节流中读取2个字节拼装成为short
*
* @param from
* @param fromIndex
* @return
*/
public static short getShortData(byte[] from, int fromIndex) {
if (from == null) {
return 0;
}
int ch1 = from[fromIndex] & 0xff;
int ch2 = from[fromIndex + 1] & 0xff; return (short) ((ch1 << 8) + (ch2 << 0));
}