code: public static short readShort(byte b[], int offset) {
      int retValue;
  
      retValue = b[offset++] << 8;
      retValue |= b[offset] & 0xff;
  
      return (short)retValue;
    }
docs: Unserializes a short from a byte array at a specific offset in big-endian order
  
  @param b byte array from which to read a short value.
  @param offset offset within byte array to start reading.
  @return short read from byte array.