BraintreeEncryption.Library.BouncyCastle.Asn1.DefiniteLengthInputStream.ReadByte C# (CSharp) Method

ReadByte() public method

public ReadByte ( ) : int
return int
        public override int ReadByte()
        {
            if (_remaining == 0)
                return -1;

            int b = _in.ReadByte();

            if (b < 0)
                throw new EndOfStreamException("DEF length " + _originalLength + " object truncated by " + _remaining);

            if (--_remaining == 0)
            {
                SetParentEofDetect(true);
            }

            return b;
        }