public override int ReadByte()
{
if (_currentStream == null)
{
if (!_first)
return 0;
Asn1OctetStringParser s = (Asn1OctetStringParser)_parser.ReadObject();
if (s == null)
return 0;
_first = false;
_currentStream = s.GetOctetStream();
}
for (;;)
{
int b = _currentStream.ReadByte();
if (b >= 0)
{
return b;
}
Asn1OctetStringParser aos = (Asn1OctetStringParser)_parser.ReadObject();
if (aos == null)
{
_currentStream = null;
return -1;
}
_currentStream = aos.GetOctetStream();
}
}
}