docs: public static short byteArrayToShort(byte[] ba) throws WsocBufferException {
          short num = 0;
          if ((ba == null) || (ba.length == 0)) {
              IllegalArgumentException x = new IllegalArgumentException("Array of no size passed in");
              throw new WsocBufferException(x);
          }
  
          if (ba.length >= 2) {
              num = (short) (ba[0] << 8 + ba[1]);
          } else {
              num = ba[0];
          }
          return num;
      }