public virtual bool readBool() { int n = r(); if (n < 0) throw IOErr.make("Unexpected end of stream").val; return n == 0 ? false : true; }