@Override
	public int read() throws IOException {
		synchronized (lock) {
			ensureOpen();
			for (;;) {
				if (nextChar >= nChars) {
					fill();
					if (nextChar >= nChars)
						return -1;
				}
				if (skipLF) {
					skipLF = false;
					if (cb[nextChar] == '\n') {
						nextChar++;
						continue;
					}
				}
				return cb[nextChar++];
			}
		}
	}
Reads a single character.

@return The character read, as an integer in the range 0 to 65535 (
        <code>0x00-0xffff</code>), or -1 if the end of the stream has been
        reached
@exception IOException
               If an I/O error occurs
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BoundedBufferedReader.java