コード例 #1
0
        /// <summary>
        /// Reads two-bytes signed value from the underlaying stream.
        /// </summary>
        /// <returns><see cref="short"/> read</returns>
        /// <exception cref="IOException">Thrown when end of stream was reached and <see cref="Unsecure"/> is false.</exception>
        public short ReadShort()
        {
            AssertRead(2, "Short");

            return(BE ? ByteUtils.ToShortBE(buffer) : ByteUtils.ToShortLE(buffer));
        }