Пример #1
0
        /// <summary>
        /// Reads two-bytes unsigned value from the underlaying stream.
        /// </summary>
        /// <returns><see cref="ushort"/> read</returns>
        /// <exception cref="IOException">Thrown when end of stream was reached and <see cref="Unsecure"/> is false.</exception>
        public ushort ReadUShort()
        {
            AssertRead(2, "UShort");

            return(BE ? ByteUtils.ToUShortBE(buffer) : ByteUtils.ToUShortLE(buffer));
        }