skipNBytes
Skips over and discards exactly n bytes of data from this input stream. If n is zero, then no bytes are skipped. If n is negative, then no bytes are skipped. Subclasses may handle the negative value differently.
This method blocks until the requested number of bytes has been skipped, end of file is reached, or an exception is thrown.
If end of stream is reached before the stream is at the desired position, then an EOFException is thrown.
If an I/O error occurs, then the input stream may be in an inconsistent state. It is strongly recommended that the stream be promptly closed if an I/O error occurs.
Since
12
Parameters
the number of bytes to be skipped.
See also
Throws
if end of stream is encountered before the stream can be positioned n bytes beyond its position when this method was invoked.
if the stream cannot be positioned properly or if an I/O error occurs.