code: public static final int getShort(byte[] data, int offset)
     {
        int result = 0;
        int i = offset;
        for (int shiftBy = 0; shiftBy < 16; shiftBy += 8)
        {
           result |= ((data[i] & 0xff)) << shiftBy;
           ++i;
        }
        return result;
     }
docs: Read a two byte integer.
  
  @param data byte array
  @param offset offset into array
  @return integer value