Here you can find the source of getShort(byte[] data)
private static int getShort(byte[] data)
//package com.java2s; //License from project: Open Source License public class Main { private static int getShort(byte[] data) { return (int) ((data[0] << 8) | data[1] & 0xFF); }/*w w w .j ava2 s.c om*/ }