private byte ReadByteOrError ()
{
if (next >= 0) {
byte b = (byte) next;
next = -1;
return b;
}
int ret = source.ReadByte ();
if (ret < 0)
throw new XmlException (String.Format ("Unexpected end of binary stream. Position is at {0}", source.Position));
return (byte) ret;
}