skip

open fun skip(input: InputStream, numToSkip: Long): Long

Skips the given number of bytes by repeatedly invoking skip on the given input stream if necessary.

In a case where the stream's skip() method returns 0 before the requested number of bytes has been skip this implementation will fall back to using the read() method.

This method will only skip less than the requested number of bytes if the end of the input stream has been reached.

Return

the number of bytes actually skipped

Parameters

input

stream to skip bytes in

numToSkip

the number of bytes to skip

Throws

on error