src/it/unimi/dsi/fastutil/io/FastBufferedInputStream.java
@Override
	public long skip(final long n) throws IOException {
		if (n <= avail) {
			final int m = (int)n;
			pos += m;
			avail -= m;
			readBytes += n;
			return n;
		}

		long toSkip = n - avail, result = 0;
		avail = 0;

		while (toSkip != 0 && (result = is == System.in ? skipByReading(toSkip) : is.skip(toSkip)) < toSkip) {
			if (result == 0) {
				if (is.read() == -1) break;
				toSkip--;
			}
			else toSkip -= result;
		}

		final long t = n - (toSkip - result);
		readBytes += t;
		return t;
	}
@Override
	public long skip(final long n) throws IOException {
		if (n <= avail) {
			final int m = (int)n;
			pos += m;
			avail -= m;
			readBytes += n;
			return n;
		}

		long toSkip = n - avail, result = 0;
		avail = 0;

		while (toSkip != 0 && (result = is == System.in ? skipByReading(toSkip) : is.skip(toSkip)) < toSkip) {
			if (result == 0) {
				if (is.read() == -1) break;
				toSkip--;
			}
			else toSkip -= result;
		}

		final long t = n - (toSkip - result);
		readBytes += t;
		return t;
	}
@ Override public long skip ( final long n ) throws IOException { if ( n <= avail ) { final int m = ( int ) n ; pos += m ; avail -= m ; readBytes += n ; return n ; } long toSkip = n - avail , result = 0 ; avail = 0 ; while ( toSkip != 0 && ( result = is == System . in ? skipByReading ( toSkip ) : is . skip ( toSkip ) ) < toSkip ) { if ( result == 0 ) { if ( is . read ( ) == - 1 ) break ; toSkip -- ; } else toSkip -= result ; } final long t = n - ( toSkip - result ) ; readBytes += t ; return t ; }
Skips over and discards the given number of bytes of data from this fast buffered input stream.

<p>As explained in the {@linkplain FastBufferedInputStream class documentation}, the semantics
of {@link InputStream#skip(long)} is fatally flawed. This method provides additional semantics as follows:
it will skip the provided number of bytes, unless the end of file has been reached.

<p>Additionally, if the underlying input stream is {@link System#in} this method will use
repeated reads instead of invoking {@link InputStream#skip(long)}.

@param n the number of bytes to skip.
@return the number of bytes actually skipped; it can be smaller than {@code n}
only if the end of file has been reached.
@see InputStream#skip(long)
Skips over and discards the given number of bytes of data from this fast buffered input stream .