@Override
	public long skip(long n) throws IOException {
		if (n < 0L) {
			throw new IllegalArgumentException("skip value is negative");
		}
		synchronized (lock) {
			ensureOpen();
			long r = n;
			while (r > 0) {
				if (nextChar >= nChars)
					fill();
				if (nextChar >= nChars) /* EOF */
					break;
				if (skipLF) {
					skipLF = false;
					if (cb[nextChar] == '\n') {
						nextChar++;
					}
				}
				long d = nChars - nextChar;
				if (r <= d) {
					nextChar += r;
					r = 0;
					break;
				}
				r -= d;
				nextChar = nChars;
			}
			return n - r;
		}
	}
Skips characters.

@param n
           The number of characters to skip

@return The number of characters actually skipped

@exception IllegalArgumentException
               If <code>n</code> is negative.
@exception IOException
               If an I/O error occurs
Ghidra/Features/Base/src/main/java/ghidra/app/util/opinion/BoundedBufferedReader.java