/// <summary> /// Reads four-bytes signed value from the underlaying stream. /// </summary> /// <returns><see cref="int"/> read</returns> /// <exception cref="IOException">Thrown when end of stream was reached and <see cref="Unsecure"/> is false.</exception> public int ReadInt() { AssertRead(4, "Int"); return(BE ? ByteUtils.ToIntBE(buffer) : ByteUtils.ToIntLE(buffer)); }