@@ -2362,16 +2362,16 @@ public static URL resourceToURL(final String name, final ClassLoader classLoader
23622362 * </p>
23632363 *
23642364 * @param input byte stream to skip
2365- * @param toSkip number of bytes to skip.
2365+ * @param skip number of bytes to skip.
23662366 * @return number of bytes actually skipped.
23672367 * @throws IOException if there is a problem reading the file
23682368 * @throws IllegalArgumentException if toSkip is negative
23692369 * @see InputStream#skip(long)
23702370 * @see <a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a>
23712371 * @since 2.0
23722372 */
2373- public static long skip (final InputStream input , final long toSkip ) throws IOException {
2374- return skip (input , toSkip , IOUtils ::getScratchByteArrayWriteOnly );
2373+ public static long skip (final InputStream input , final long skip ) throws IOException {
2374+ return skip (input , skip , IOUtils ::getScratchByteArrayWriteOnly );
23752375 }
23762376
23772377 /**
@@ -2391,7 +2391,7 @@ public static long skip(final InputStream input, final long toSkip) throws IOExc
23912391 * </p>
23922392 *
23932393 * @param input byte stream to skip
2394- * @param toSkip number of bytes to skip.
2394+ * @param skip number of bytes to skip.
23952395 * @param skipBufferSupplier Supplies the buffer to use for reading.
23962396 * @return number of bytes actually skipped.
23972397 * @throws IOException if there is a problem reading the file
@@ -2400,16 +2400,16 @@ public static long skip(final InputStream input, final long toSkip) throws IOExc
24002400 * @see <a href="https://issues.apache.org/jira/browse/IO-203">IO-203 - Add skipFully() method for InputStreams</a>
24012401 * @since 2.14.0
24022402 */
2403- public static long skip (final InputStream input , final long toSkip , final Supplier <byte []> skipBufferSupplier ) throws IOException {
2404- if (toSkip < 0 ) {
2405- throw new IllegalArgumentException ("Skip count must be non-negative, actual: " + toSkip );
2403+ public static long skip (final InputStream input , final long skip , final Supplier <byte []> skipBufferSupplier ) throws IOException {
2404+ if (skip < 0 ) {
2405+ throw new IllegalArgumentException ("Skip count must be non-negative, actual: " + skip );
24062406 }
24072407 //
24082408 // No need to synchronize access to SCRATCH_BYTE_BUFFER_WO: We don't care if the buffer is written multiple
24092409 // times or in parallel since the data is ignored. We reuse the same buffer, if the buffer size were variable or read-write,
24102410 // we would need to synch or use a thread local to ensure some other thread safety.
24112411 //
2412- long remain = toSkip ;
2412+ long remain = skip ;
24132413 while (remain > 0 ) {
24142414 final byte [] skipBuffer = skipBufferSupplier .get ();
24152415 // See https://issues.apache.org/jira/browse/IO-203 for why we use read() rather than delegating to skip()
@@ -2419,7 +2419,7 @@ public static long skip(final InputStream input, final long toSkip, final Suppli
24192419 }
24202420 remain -= n ;
24212421 }
2422- return toSkip - remain ;
2422+ return skip - remain ;
24232423 }
24242424
24252425 /**
0 commit comments