See the general contract of the skip method of InputStream.
skip
InputStream
if this input stream has been closed by invoking its .close method, in.skip(n) throws an IOException, or an I/O error occurs.
in.skip(n)