/// <summary>
        /// Writes two-byte unsigned short value to the underlaying stream
        /// </summary>
        /// <param name="value"><see cref="ushort"/> value to write</param>
        public void Write(ushort value)
        {
            if (BE)
            {
                ByteUtils.FromUShortBE(buffer, value);
            }
            else
            {
                ByteUtils.FromUShortLE(buffer, value);
            }

            stream.Write(buffer, 0, 2);
        }