Example #1
0
        public short GetBigEndianShort()
        {
            if (Index + 1 >= this.DataLgth)
            {
                throw new Exception("no more bytes to read from array");
            }
            var ip = IntParts.LoadBigEndianShort(this.Bytes, this.Index);

            this.Index += 2;
            return(ip.ShortValue);
        }
Example #2
0
        public short PeekBigEndianShort(int Offset)
        {
            var ix = this.Index + Offset;

            if (ix + 1 >= this.DataLgth)
            {
                throw new Exception("no more bytes to read from array");
            }
            var ip = IntParts.LoadBigEndianShort(this.Bytes, ix);

            return(ip.ShortValue);
        }